#include <iostream>
#include <string>

using namespace std;

int main(int argc, char *argv[])
{
  string line;
  int lines=0;
  while (getline(cin,line)) {
    ++lines;
  }
  cout << lines << endl;
  return 0;
}