#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <functional>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <vector>
#include <array>
#include <tuple>
#include <utility>
#include <numeric>
#include <iomanip>
#include <cctype>
#include <cmath>
#include <assert.h>
#include <cstdlib>
#include <list>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using PII = pair<int, int>;
using PLL = pair<ll, ll>;

template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
    return s << "(" << p.first << ", " << p.second << ")";
}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
    s << "[";
    for (int i = 0; i < v.size(); i++) s << (i == 0 ? "" : ", ") << v[i];
    s << "]";
    return s;
}

#define ALL(a) (a).begin(), (a).end()

int main() {
    string s;
    cin >> s;

    static int even[26];
    for (char ch : s) {
        even[ch - 'a'] ^= 1;
    }
    bool flag = true;
    for (char ch = 'a'; ch <= 'z'; ch++) {
        if (even[ch - 'a']) flag = false;
    }
    if (flag) {
        cout << 1 << endl;
        return 0;
    }

    const int MAXN = 300000;
    static int mask[MAXN];
    int N = s.size();
    int ans = 1 << 28;

    bool first = true;

    go:
        ;

    for (int i = 0; i < N; i++) {
        mask[i] = 1 << (s[i] - 'a');
        if (i > 0) mask[i] ^= mask[i - 1];
    }

    /*
    for (int i = 0; i < N; i++) {
        cerr << i << ": " << mask[i] << endl;
    }
    */

    static int link[(1 << 26)][2];
    static int dp[MAXN];
    memset(link, -1, sizeof(link));
    for (int i = 0; i <= N; i++) dp[i] = (1 << 28);

    dp[N] = 0;
    for (int i = N - 1; i >= 0; i--) {
        link[mask[i]][0] = max(link[mask[i]][0], i);

        int mine = mask[i] ^ (1 << (s[i] - 'a'));
        for (int j = 0; j < 26; j++) {
            // アルファベットjを奇数の文字とする
            int nmask = mine ^ (1 << j);
            if (link[nmask] < 0) continue;
            dp[i] = min(dp[i], 1 + dp[link[nmask][0] + 1]);
        }
    }
    ans = min(ans, dp[0]);

    if (first) {
        cerr << "uoo" << endl;
        reverse(ALL(s));
        first = false;
        goto go;
    }

    cout << ans << endl;

    return 0;
}
