from collections import defaultdict
inf = 10**6
s = input()
N = len(s)
cumsum = [0]*(N+1)
d = defaultdict(lambda :-1)
for i in range(N):
    num = ord(s[i])-ord('a')
    cumsum[i] = cumsum[i-1]^(1<<num)
    d[cumsum[i]] = i
dp = [inf]*(N+1)
dp[-2] = 0
for i in range(N-2, -2, -1):
    j = d[cumsum[i]]
    if j>i:
        dp[i] = dp[j]+1
    for k in range(26):
        x = cumsum[i]+(1<<k)
        j = d[x]
        if j>i:
            dp[i] = min(dp[i], dp[j]+1)
print(dp[-1])
    

    
    

    



