s = input()
n = len(s)
s = [ord(c)-ord('a') for c in s]
h = [0] * n
h[0] = 1<<s[0]
for i in range(1,n):
  h[i] = h[i-1] ^ (1<<s[i])
dp = [0] * (n)
for i in range(1,n):
  syo = float("inf")
  for j in range(0,i):
    tmp = h[i] ^ h[j]
    if tmp == 0 or (tmp & (tmp-1)) == 0:
      syo = min(syo,dp[j]+1)
  dp[i] = syo
print(dp[-1])