import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

void main() {
    auto S = readln.chomp;
    auto N = S.length.to!int;
    auto X = new int[](N+1);
    int[][int] Y;
    X[0] = 0;
    Y[0] = [0];
    foreach (i; 0..N) {
        int c = S[i] - 'a';
        X[i+1] = X[i] ^ (1 << c);
        Y[X[i+1]] ~= i+1;
    }

    auto mem = new int[](N+1);
    mem.fill(-1);
    int dfs(int n) {
        if (n == 0) return 0;
        if (mem[n] >= 0) return mem[n];

        int ret = 1 << 29;
        foreach (i; 0..26) {
            int next = X[n] ^ (1 << i);
            if (next in Y) {
                foreach (m; Y[next]) {
                    if (m >= n) break;
                    ret = min(ret, dfs(m)+1);
                }
            }
        }

        if (X[n] in Y) {
            foreach (m; Y[X[n]]) {
                if (m >= n) break;
                ret = min(ret, dfs(m)+1);
            }
        }

        mem[n] = ret;
        return mem[n];
    }

    dfs(N).writeln;
}
