s = input()
n = len(s)
cA = ord('a')

su = [0]*n
cp = 1 << (ord(s[0])-cA)
P = {cp: 0}
prev = [-1]*26
dp = [10**18 for i in range(n+1)]

dp[0] = 1
su[0] = cp
prev[ord(s[0])-cA] = 0
for i in range(1, n):
    code = ord(s[i]) - cA
    dp[i] = min(dp[i], dp[i-1] + 1)
    pv = prev[code]
    if pv != -1:
        need = su[i-1] ^ su[pv]
        #print(need, pv)
        state = need ^ su[pv] ^ (1 << code)
        #print(i, state, P)
        if state == 0:
            dp[i] = 1
        elif state in P:
            j = P[state]
            dp[i] = min(dp[i], dp[j] + 1)
    if cp == 0:
        dp[i] = 1
    if cp in P:
        j = P[cp]
        dp[i] = min(dp[i], dp[j] + 1)
    cp ^= 1 << code
    if cp == 0:
        dp[i] = 1
    if cp in P:
        j = P[cp]
        dp[i] = min(dp[i], dp[j] + 1)
    else:
        P[cp] = i
    prev[code] = i
    su[i] = cp

    for j in range(26):
        pv = prev[j]
        if pv != -1:
            need = su[i] ^ su[pv]
            state = need ^ su[pv] ^ (1 << j)
            if state == 0:
                dp[i] = 1
            elif state in P:
                k = P[state]
                dp[i] = min(dp[i], dp[k] + 1)
#print(dp)
print(dp[n-1])
