#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
using namespace std;
template<typename T>
void get(T& t){cin >> t;}

string str;
void proce(int start, vector<int>& distances, int dist, int bb_full){
	if(dist > distainces[str.size() - 1])return;
	int bb_ = 0;
	for(int i=str.size() - 1;i >= start;i--){
		int bb = bb_full ^ bb_;
		if((bb & (bb - 1))== 0 && distances[i] > dist + 1){
			distances[i] = dist + 1;
			proce(i + 1, distances, dist + 1, bb_);
		}
		bb_ ^=1 << (str.at(i)-'a');
	}
	return ;
}
int main(void){
	get(str);
	vector<int> distances(str.size() + 1);
	int bb = 0;
	for(int i=0;i<str.size();i++){
		distances[i] = str.size();
		bb ^=1 << (str.at(i)-'a');
	}
	proce(0, distances, 0, bb);
	cout << distances[str.size() - 1]<<endl;
	return 0;
}
