s = input()
n = len(s)
INF = 10**9

alph = "abcdefghijklmnopqrstuvwxyz"
to_int = {v: i for i, v in enumerate(alph)}
dp = [INF]*(n+1)
dp[0] = 0

for i in range(n):
    tmp = 0
    for j in range(i+1)[::-1]:
        tmp ^= 1 << to_int[s[j]]
        if bin(tmp).count("1") <= 1:
            dp[i+1] = min(dp[j] + 1, dp[i+1])
print(dp[-1])