from collections import defaultdict

s = input()
N = len(s)

# ord('a') == 97
acc_xor = [0] * (N+1)
for i in range(N):
    acc_xor[i+1] = acc_xor[i] ^ (2 ** (ord(s[i]) - 97))
acc2idx = defaultdict(lambda: [0])
for i in range(N+1):
    acc2idx[acc_xor[i]].append(i)

for k in acc2idx.keys():
    acc2idx[k] = [max(acc2idx[k])]

dp = [defaultdict(lambda: float('inf')) for _ in range(N+1)]
dp[0][0] = 0
for i in range(N):
    hash_cur = acc_xor[i]
    dp[acc2idx[hash_cur][0]][hash_cur] = min(dp[acc2idx[hash_cur][0]][hash_cur], dp[i][hash_cur] + 1)
    for j in range(26):
        hash_new = hash_cur ^ (2**j)
        dp[acc2idx[hash_new][0]][hash_new] = min(dp[acc2idx[hash_new][0]][hash_new], dp[i][hash_cur] + 1)

print(min(dp[-1].values()))
