/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

int main()
{
  int n = 0;
  int c;
  while((c=getchar()) != EOF)
  {
    if(c == '\n')
    {
      n++;
    }
  }
  printf("%d\n", n);
  return 0;
}
