from heapq import heappush, heappop
from itertools import accumulate

s = input()
N = len(s)
cnt = [[0] * (N+1) for _ in range(26)]
for i in range(N):
    cnt[ord(s[i]) - ord('a')][i+1] += 1
for c in range(26):
    cnt[c] = list(accumulate(cnt[c]))

dp = [(0, 0)]
for i in range(N):
    tmp = dp[:]
    res = 0
    while tmp:
        cost, j = heappop(tmp)
        odd = 0
        for c in range(26):
            if (cnt[c][i+1] - cnt[c][j]) % 2 == 1:
                odd += 1
        if odd <= 1:
            res = cost + 1
            break
    heappush(dp, (res, i + 1))
for cost, j in dp:
    if j == N:
        print(cost)
        break