inf = float("inf")
def kaibun(x):
    species = set(list(x))
    lst = []
    for char in species:
        lst.append(x.count(char) % 2)
    if lst.count(1) <= 1:
        return 1
    else:
        return inf

def rec(curr, rest):
    if (curr, rest) in memo.keys():
        return memo[(curr, rest)]
    if rest == "":
        memo[(curr, rest)] = kaibun(curr)
    else:
        one_or_inf = kaibun(curr + rest[0])
        if one_or_inf == 1:
            drop = kaibun(curr + rest[0]) + rec("", rest[1:])
        else:
            drop = inf
        keep = rec(curr + rest[0], rest[1:])
        memo[(curr, rest)] = min(drop, keep)
    return memo[(curr, rest)]

memo = {}

print(rec("", input()))
