import string

ALPHABETS = string.ascii_lowercase


def is_avairable(a):
    return bin(a).count('1') <= 1


s = input()
N = len(s)
a = [0] * (N + 1)
for i, c in enumerate(s):
    idx = ALPHABETS.index(c)
    a[i+1] = a[i] ^ (2 ** idx)

opt = [0] * (N + 1)
for i in range(1, N + 1):
    min = -1
    for j in range(i):
        if is_avairable(a[j] ^ a[i]):
            if opt[j] < min or min < 0:
                min = opt[j]
    opt[i] = min + 1
print(opt[N])
