use std::cmp::*;
use std::collections::*;

fn main() {
    let s = read::<String>()
        .chars()
        .map(|x| x.to_digit(36).unwrap() - 10)
        .collect::<Vec<_>>();
    let n = s.len();
    let mut a = vec![0usize; n];
    a[0] = 1 << s[0];
    for i in 1..n {
        a[i] = a[i - 1] ^ (1 << s[i]);
    }
    let mut dp = vec![-1; 1 << 26];
    dp[a[0]] = 1;
    for i in 1..n {
        if a[i].count_ones() <= 1 {
            dp[a[i]] = 1;
            continue;
        }
        for ci in 0..26 {
            let from = a[i] ^ (1 << ci);
            if dp[from] == -1 {
                continue;
            }
            dp[a[i]] = min(dp[a[i]], dp[from] + 1);
        }
    }
    println!("{}", dp[a[n - 1]]);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
