#include <iostream.h>
int main(){char c;int i=0;while(cin.get(c))if('\n'==c)i++;cout<<i<<endl;return 0;}