n=int(input()) slist=[input() for _ in range(n)] sslist={} for i,j in range(n): if i==j: continue sslist.add(slist[i]+slist[j]) print(len(sslist))