import java.util.HashSet;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        HashSet<String> set = new HashSet<String>();
        while (in.hasNext()) {//注意while处理多个case
        	set.add(in.next());
        }
        System.out.println(set.size());
    }
}