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

fun main() {
    // If you want to iterate over `lines` multiple times, write `generateSequence(::readLine).toList()`
    val lines = generateSequence(::readLine)
    println(lines.count())
}