#include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
const double PI = acos(-1);
const double EPS = 1e-9;
template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	string s; cin >> s;
	int i(0);
	int ans(0);
	while (i < s.length()) {
		vector<int>v(26, 0);
		int index = i;
		rep(j, i, s.length()) {
			v[s[j] - 'a']++;

			int len = j - i + 1;
			int odd(0), even(0);
			rep(k, 0, v.size()) {
				if (v[k] & 1)odd++;
				else even++;
			}

			if ((odd == 1 && len & 1) || (odd == 0 && len % 2 == 0)) {
				chmax(index, j);
			}
		}
		ans++;
		dump(s.substr(i, index - i + 1));
		i = index + 1;
	}

	i = s.length() - 1;
	int ans_(0);
	while (i >= 0) {
		vector<int>v(26, 0);
		int index = i;
		for (int j = i; j >= 0; j--) {
			v[s[j] - 'a']++;

			int len = i - j + 1;
			int odd(0), even(0);
			rep(k, 0, v.size()) {
				if (v[k] & 1)odd++;
				else even++;
			}

			if ((odd == 1 && len & 1) || (odd == 0 && len % 2 == 0)) {
				chmin(index, j);
			}
		}
		ans_++;
		i = index - 1;
	}


	dump(ans, ans_);



	cout << min(ans,ans_) << endl;
	return 0;
}