#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <random>
#include <functional>

using namespace std;

#define F first
#define S second
#define pb push_back
#define epr(...) fprintf(stderr, __VA_ARGS__)
#define db(x) cerr << #x << " = " << x << endl
#define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; 
#define db3(x, y, z) cerr << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", " << z << ")\n"
#define dbv(a) cerr << #a << ": "; for (auto& xxxx: a) cerr << xxxx << " "; cerr << endl;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)a.size()
#define pw(n) (1ll << (n))
#define equal equalll
#define less lesss

typedef double dbl;
typedef long long ll;
const int N = -1;
const int INF = 1.01e9;
typedef vector<int> vi;
const int ALF = 26;



int solve(string s) {
    int n = s.size(); 
    vector<ll> pref;
    pref.pb(0);
    assert(ALF == 'z' - 'a' + 1);
    map<ll,int> dp;

    for (auto x: s) {
        pref.pb(pref.back() ^ pw(x - 'a'));
        assert('a' <= x && x <= 'z');
        dp[pref.back()] = INF;
    }
    set<int> comb(all(pref));
    //map<ll,int> last;
    //for (int i = 0; i < sz(pref); i++) { last[pref[i]] = i; } 

    auto upd = [](int& A, int B) {
        A = min(A, B);
    };

    //vector<int> dp(n + 1, INF);
    dp[0] = 0;
    //for (int i = 0; i < n; i++) cerr << s[i] - 'a' << " "; cerr << endl;
    //db(last[pw(2)]);
    for (int i = 0; i < n; i++) {
        if (dp[pref[i]] < INF) {
            //db(i);
            upd(dp[pref[i]], dp[pref[i]] + 1);
            for (int j = 0; j < ALF; j++) {
                if (comb.count(pref[i] ^ pw(j))) {
                    upd(dp[pref[i] ^ pw(j)], dp[pref[i]] + 1);
                }
                //}
            }
        }
    }
    //dbv(dp);
    //for (auto x: I//
    return max(1, dp[pref[n]]);
}

int slow(string s) {
    int n = s.size();
    vector<int> dp(n + 1, INF);
    dp[0] = 0;
    for (int i = 0; i < n; i++) {
        if (i >= INF) continue;
        for (int len = 1; len + i <= n; len++) {
            string t = s.substr(i, len);
            sort(all(t));
            bool ok = 0;
            do {
                bool flag = 1;
                for (int j = 0; j < len; j++) {
                    flag &= t[j] == t[len - 1 - j];
                }
                if (flag) {
                    ok = 1;
                    break;
                }
            } while (next_permutation(all(t)));
            if (ok) {
                dp[i + len] = min(dp[i + len], dp[i] + 1);
            }
        }
    }
    return dp[n];
}


int main(){
#ifdef HOME 
    assert(freopen("in", "r", stdin));
#endif
    if (1) {
        string s;
        cin >> s;
        cout << solve(s) << endl;
        //cout << slow(s) << endl;
    }
    else { 
        for (int tt = 0; ; tt++) { 
            db(tt);
            int n = rand() % 10 + 1; 
            string s;
            for (int i = 0; i < n; i++) {
                s.pb('a' + rand() % 5);
            }
            int r1 = solve(s);
            int r2 = slow(s);
            db3(s, r1, r2);
            assert(r1 == r2);
        }
    }


    



    
#ifdef HOME 
    epr("time = %d ms\n", (int)(clock() * 1000. / CLOCKS_PER_SEC));
#endif
    return 0;
}



Measured memory_bytes: 24820