import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


s = input()
n = len(s)
from collections import Counter
c = Counter(s)
d = {k:0 for k in c.keys()}
e = [0]*n # 奇数回数の文字の最後の出現位置
for i,item in enumerate(s):
    d[item] += 1
    if c[item]%2==1 and d[item]==c[item]:
        e[i] = 1
        
ans = 0
val = 0
for i in range(n):
    if val+e[i]>=2:
        ans += 1
        val = 1
    else:
        val += e[i]
print(ans+1)