s = input()

number = -1
n = len(s)
for i in range(2**n):
    split = []
    start = 0
    for j in range(n):
        if (i>>j)&1:
            ss = s[start:j+1]
            if ss not in split:
                split.append(ss)
                start = j + 1

        if number<len(split):
            number = len(split)
        #print(split)

print(number)

