import sys
from collections import defaultdict as dd
input = sys.stdin.readline
S = list(input())[: -1]
N = len(S)
cs = [0] * (N + 1)
a = ord("a")
table = [1 << x for x in range(27)]
for i in range(N):
  cs[i + 1] = cs[i] ^ table[(ord(S[i]) - a)]
#print(cs)
d = dd(set)
for i in range(N, -1, -1): d[cs[i]].add(i)

dp = [N] * (N + 1)
dp[0] = 0
for i in range(N):
  for j in range(26):
    cp = set(d[cs[i] ^ table[j]])
    for k in cp:
      dp[k] = min(dp[k], dp[i] + 1)
      d[cs[i] ^ table[j]].discard(k)
  cp = set(d[cs[i]])
  for k in cp:
    if i != k:
      dp[k] = min(dp[k], dp[i] + 1)
      d[cs[i]].discard(k)
print(dp[-1])