a = [] for i in range(10): n = int(input()) a.append(n) b = [] for i in a: b.append(i % 42) total = len(set(b)) print(total)