#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long
#define pii pair<int,int>
#define pll pair<LL,LL>

using namespace std;

int main(){

    string s;cin>>s;
    int n=s.size();
    int isOdd[n+1];
    fill_n(isOdd,n+1,0);

    int dp[n+1];
    fill_n(dp,n+1,1000000);
    dp[0]=0;

    map<int,int> bintoid;
    int vec[n+1];
    fill_n(vec,n+1,-1);
    vec[0]=0;
    bintoid[0]=0;

    int nid = 1;

    REP(i,n){
        int c = s[i]-'a';
        isOdd[i+1]=(isOdd[i]^(1<<c));
        REP(j,26){
            int k = isOdd[i+1]^(1<<j);
            if(bintoid.find(k)==bintoid.end())continue;
            int id = bintoid[k];
            //for(int v : vec[id])dp[i+1]=min(dp[i+1],dp[v]+1);
            dp[i+1]=min(dp[i+1],dp[vec[id]]+1);
        }
        if(bintoid.find(isOdd[i+1])!=bintoid.end()){
            //for(int v:vec[bintoid[isOdd[i+1]]])dp[i+1]=min(dp[i+1],dp[v]+1);
            dp[i+1]=min(dp[i+1],dp[vec[bintoid[isOdd[i+1]]]]+1);
        }

        if(bintoid.find(isOdd[i+1])==bintoid.end()){
            bintoid[isOdd[i+1]]=nid++;
        }
        vec[bintoid[isOdd[i+1]]].push_back(i+1);

    }

    cout<<dp[n]<<endl;
    return 0;
}