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

#include <stdio.h>

int main() {
    char line[1000];
    int lines = 0;
    while (fgets(line, sizeof(line), stdin)) {
        lines++;
    }
    printf("%d", lines);
}