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

use std::io::BufRead;

fn main() {
    let stdin = std::io::stdin();
    let lines = stdin.lock().lines();
    println!("{}", lines.count());
}