#include <bits/stdc++.h>

#define I inline
#define fi first
#define se second
#define R register
#define LL long long
#define mp make_pair
#define reg register int
#define pii pair<int,int>
#define fo(i, a, b) for(reg i = a; i <= b; i++)
#define fd(i, a, b) for(reg i = a; i >= b; i--)
#define cr const reg&
using namespace std;
const int N = 2e5 + 1;

I int _max(cr x, cr y) {return x > y ? x : y;}
I int _min(cr x, cr y) {return x < y ? x : y;}
I int read() {
	reg x = 0, f = 1; char ch = getchar();
	while(ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar();}
	while(ch >= '0' && ch <= '9') x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar();
	return x * f;
}
I void ptt(LL x) {if(x >= 10) ptt(x / 10); putchar(x % 10 + '0');}
I void put(LL x) {x < 0 ? putchar('-'), ptt(-x) : ptt(x);}
I void pr1(LL x) {put(x), putchar(' ');}
I void pr2(LL x) {put(x), puts("");}

I int lowbit(cr x) {return x & -x;}

char ss[N];
int f[N], hh[N];
map<int, int> g;

int main() {
	scanf("%s", ss + 1);
	reg n = strlen(ss + 1);
	fo(i, 1, n) {
		reg c = ss[i] - 'a';
		hh[i] = hh[i - 1] ^ (1 << c);
	} memset(f, 63, sizeof(f));
	f[0] = 0; g[0] = 0;
	fo(i, 1, n) {
		if(g.count(hh[i])) f[i] = _min(f[i], f[g[hh[i]]] + 1);
		else g[hh[i]] = i;
		fo(j, 0, 25) if(g.count(hh[i] ^ (1 << j))) 
		f[i] = _min(f[i], f[g[hh[i] ^ (1 << j)]] + 1);
	} pr2(f[n]);
	return 0;
}

