//#summon tourist
//#define _GLIBCXX_DEBUG
//実行時エラー、なぜ？？？
include <bits/stdc++.h>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
using namespace std;
using ll=long long;
using ld=long double;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
struct edge{ll to,cost;};
struct edge2{ll from,to,cost;};

template <typename T>
bool chmax(T &a, const T& b) {
    if (a < b) {
      a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmin(T &a, const T& b) {
    if (a > b) {
      a = b;
      return true;
    }
    return false;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string s;
    cin >> s;
    int n=s.size();
    vector<int> dp(n+1);
    vector<int> acc(n+1);
    acc[0]=0;
    vector<int> first(1<<26);
    rep(i,1<<26){
        first[i]=n;
    }
    first[0]=0;
    int now=0;
    rep(i,n){
        now=(ll)pow(2,s[i]-'a');
        acc[i+1]=acc[i]^now;
        if(first[acc[i+1]]==n){
            first[i+1]=now;
        }
    }
    rep(i,n+1){
        dp[i]=2*n;
    }
    dp[0]=0;
    rep(i,n){
        dp[i+1]=min(dp[i]+1,dp[first[now]]+1);
        ll k=1;
        rep(j,26){
            chmin(dp[i+1],dp[first[k^(i+1)]]+1);
            k*=2;
        }
    }
    cout << dp[n] << endl;
}
/*
overflow checked?
corner case checked?
boundary checked?
not TLE in worst case checked?
*/