arr = set() for i in range(10): arr.add(int(input())%42) print(len(arr))