#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>
#include<map>
#include<queue>
#include<bitset>


using namespace std;

#define endl "\n"

constexpr long long INF = (long long)1e9;
constexpr long long MOD = 1'000'000'007; 

struct fast_io {
	fast_io(){
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
	};
} fio;

signed main(){
	cout<<fixed<<setprecision(10);
	
	constexpr int num = 26;
	string s;
	int N;
	int con = 0, ans = 0;
	queue<pair<int,int>> Q;
	vector<vector<int>> G;
	vector<int> d;
	map<int,int> mp;
	
	cin>>s;
	
	N = s.size();
	
	mp[0] = 0;
	
	G.resize(N+1);
	d.resize(N+1, INF);
	
	for(int i = 0; i < N; i++){
		con ^= (1<<(s[i] - 'a'));
		// cout<<bitset<26>(con)<<endl;
		
		for(int j = 0; j < num; j++){
			int hoge = con ^ (1<<j);
			
			if(mp.count(hoge)) {
				G[mp[hoge]].push_back(i+1);
			}
		}
		
		if(mp.count(con)) {
			G[mp[con]].push_back(i+1);
		} else {
			mp[con] = i+1;
		}
	}
	
	Q.push({0,0});
	
	d[0] = 0;
	
	while(!Q.empty()) {
		pair<int,int> p = Q.front(); Q.pop();
		int v = p.second;
		// cout<<"v "<<v<<" "<<p.first<<endl;
		
		if(v == N) {
			ans = p.first;
			break;
		}
		
		if(d[v] < p.first) continue;
		
		for(int nex : G[v]){
			if(d[nex] > p.first + 1) {
				d[nex] = p.first + 1;
				Q.push({d[nex], nex});
			}
		}
	}
	
	cout<<ans<<endl;
	
	return 0;
}