// Template for reading lines from stdin and printing the line count to stdout.
// Copy this code to your IDE to get started.

var lines: [String] = []
while let line = readLine() {
    lines.append(line)
}
print(lines.count)