import sys
readline = sys.stdin.readline
from collections import defaultdict

S = list(map(lambda x: ord(x)-97, readline().strip()))
N = len(S)

table = [0] + [1<<S[i] for i in range(N)]
for i in range(1, N+1):
    table[i] ^= table[i-1]

inf = 10**9+7
dp = defaultdict(lambda: inf)
dp[0] = 0

for i in range(1, N+1):
    t = table[i]
    res = 1+dp[t]
    for j in range(26):
        res = min(res, 1+dp[t^(1<<j)])
    dp[t] = min(dp[t], res)
print(res)