print(len(set([int(input()) % 42 for _ in range(10)])))