a=[]
aa=[]
ma=[]
i=1
for x in input():
    a.append(x)
while i>0:
    i=0
    aa=[]
    ma=[]
    for x in a:
        ma.append(x)
        if x in aa:
            i+=1
        else:
            aa.append(''.join(ma))
            ma=[]
    if ma!=[]:
        aa.append(''.join(ma))
        if ''.join(ma) in aa:
            i+=1
    a=aa
print(len(aa))