input() print len(set([x % 23 for x in list(map(int, raw_input().split()))]))