lst1 = set() while True: try: s = input().split() for a in s: lst1.add(a) except: break print(len(lst1))