import java.io.*;
import java.util.*;

public class countWords {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner fileScanner = new Scanner(new File(args[0]));
        int count = 0;
        while (fileScanner.hasNext()) {
            count++;
            String dummy = fileScanner.next();
        }
        System.out.println(count);
    }
}
