import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); int scanCount = 0; while (cin.hasNext()) { String s = cin.next(); scanCount++; } System.out.println(scanCount); } }