// 基本テンプレート

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
using namespace std;

#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define int long long int

template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}

typedef pair<int, int> pii;
typedef long long ll;

int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
constexpr ll INF = 1001001001001001LL;
constexpr ll MOD = 1000000007LL;

int bit[200010];
vector<int> v[1 << 26];
int dp[200010];

// generate binary string (not less than k-digit)
string to_binString(int n, int k) {
    string ret = "";
    while(n) ret += ('0' + (n&1)), n >>= 1;
    while(ret.length() < k) ret += '0';
    reverse(ret.begin(), ret.end());
    return ret;
}

signed main() {
    string s; cin >> s;
    int len = s.length();
    v[0].push_back(0);
    rep(i,0,len) {
        bit[i+1] = bit[i];
        bit[i+1] ^= (1 << (s[i] - 'a'));
        
        // cout << to_binString(bit[i+1], 26) << endl;
        v[bit[i+1]].push_back(i+1);
    }

    fill(dp, dp+len+1, INF);
    dp[0] = 0;

    rep(i,0,len) {
        int bt = bit[i+1];
        rep(k,-1,26) {
            int nbit = (k < 0 ? bt : bt ^ (1 << k));
            // printf("nbit = ");
            // cout << to_binString(nbit, 26) << endl;
            for(auto x : v[nbit]) {
                // printf("i = %lld, k = %lld, x = %lld\n", i+1, k, x);
                if(x >= i+1) break;
                chmin(dp[i+1], dp[x] + 1);
            }
        }
    }
    // repq(i,0,len) printf("dp[%lld] = %lld\n", i, dp[i]);
    cout << dp[len] << endl;
    return 0;
}