https://www.acmicpc.net/problem/3052
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
HashSet<Integer> h = new HashSet<Integer>();
for(int i=0; i<10; i++){
int X = Integer.parseInt(br.readLine());
h.add(X%42);
}
System.out.println(h.size());
}
}