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