from string import ascii_lowercase
import heapq

cd = {c: 1 << i for i, c in enumerate(ascii_lowercase)}


def solve(s):
    queue = [(0, s)]
    while queue:
        n, s = heapq.heappop(queue)
        if not s:
            return n
        b = 0
        for i, c in enumerate(s):
            b ^= cd[c]
            if bin(b).count('1') <= 1:
                heapq.heappush(queue, (n + 1, s[i + 1:]))


print(solve(input()))
