import sys

val=[]
data=sys.stdin.readlines()
for item in data:
    item=item.split(" ")
    for i in item:
        i=i.strip("\n")
        val.append(i)

print(len(set(val)))