S = raw_input()
S = map(ord, S)
a = ord('a')

dp = {}
def get_dp(i):
    if i in dp:
        return dp[i]
    if i == len(S):
        return 0
    num = [0 for t in range(26)]
    dp[i] = len(S) - i

    def check():
        cnt = 0
        for n in num:
            cnt += n % 2 == 1
        return cnt <= 1
    
    for j in range(i, len(S)):
        num[S[j] - a] += 1
        if check():
            dp[i] = min(dp[i], 1 + get_dp(j+1))
    return dp[i]
    

print get_dp(0)
