import sys

# for line in sys.stdin:
n = sys.stdin.read().splitlines()
a = set(n)
print(len(a)-1)


set(可迭代对象)初始化集合,最后结果-1,是第一行的数字