def main():
    S = input()
    a = {j: i for i, j in enumerate('abcdefghijklmnopqrstuvwxyz')}
    S = [a[i] for i in S]

    parity = 0
    dict_parity = [10**6]*(2**26)
    dict_parity[0] = 0

    for i, s in enumerate(S):
        parity ^= 2**s
        ans = min([dict_parity[parity ^ 2**j]+1 for j in range(26)])
        ans = min(ans, i+1, dict_parity[parity]+1)
        dict_parity[parity] = min(ans, dict_parity[parity])
    print(ans)


main()