import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
// Press Shift twice to open the Search Everywhere dialog and type show whitespaces,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int count = 0;
Set<Integer> set = new HashSet<>();
for (int i = 0; i < 10; i++) {
int a = Integer.parseInt(br.readLine());
int b = a % 42;
set.add(b);
}
System.out.println(set.size());
}
}