# URL: https://atcoder.jp/contests/abc085/tasks/abc085_b

N = int(input())
d = [int(input()) for _ in range(N)]
print(len(set(d)))

f643eb1bd2ac981748cb8ee0ee6eafeb19063a1b
<mask token>

<mask token>
print(len(set(d)))

N = int(input())
d = [int(input()) for _ in range(N)]
print(len(set(d)))

# URL: https://atcoder.jp/contests/abc085/tasks/abc085_b

N = int(input())
d = [int(input()) for _ in range(N)]
print(len(set(d)))
