import Data.Array



solver::Int->[Char]->Int
solver sc [] = sc
solver sc xs = let rev = reverse (vec_list xs) in
               let (_,n) = head (dropWhile (\(x,y)->False == x) rev) in
               solver (sc+1) (drop n xs)

vec_list::[Char]->[(Bool,Int)]
vec_list xs = zip (map decider (fold_ls add_char_vec char_vec_zero xs)) [1..]

char_vec_zero::Array Char Int
char_vec_zero = listArray ('a','z') (repeat 0)

add_char_vec::Array Char Int -> Char -> Array Char Int
add_char_vec  ar c = listArray ('a','z') [(ar!c')+(if c'==c then 1 else 0)|c'<-['a'..'z']]

decider::Array Char Int -> Bool
decider ar = (length (filter (\x-> mod x 2 == 1)(elems ar)))<=1

fold_ls::(a->b->a)->a->[b]->[a]
fold_ls f i [] = []
fold_ls f i (x:xs) = (f i x):(fold_ls f (f i x) xs)

main::IO()
main=do
  str<-getLine
  print (solver 0 str)