def main(): n = input() a = [] for i in range(0,n): a.append(input()) a[i] = a[i]%23 c = 0 l = [] for i in range(0,n): if a[i] not in l: l.append(a[i]) c+=1 print c return 0 main()