#include <bits/stdc++.h>

#define FI(i,a,b) for(int i=(a);i<=(b);i++)
#define FD(i,a,b) for(int i=(a);i>=(b);i--)

#define LL long long
#define Ldouble long double
#define PI 3.14159265358979323846264338327950288419

#define PII pair<int,int>
#define PLL pair<LL,LL>
#define mp make_pair
#define fi first
#define se second

using namespace std;

char s[200005];
int len, ps[26][200005], num[200005];
int dp[200005];
map<int, int> M;

int main(){
	scanf("%s", s + 1);
	len = strlen(s + 1);
	FI(i, 1, len){
		FI(j, 0, 25) ps[j][i] = ps[j][i - 1];
		ps[s[i] - 'a'][i]++;
		FI(j, 0, 25) if(ps[j][i] & 1){
			num[i] += (1 << j);
		}
	}
	M[0] = 0;
	FI(j, 1, n){
		dp[j] = 999999;
		FI(k, 0, 26){
			int x = num[j];
			if(k != 26) x ^= (1 << k);
			if(M.count(x)){
				dp[j] = min(dp[j], M[x] + 1);
			}
		}
		if(M.count(num[j])){
			M[num[j]] = min(M[num[j]], dp[j]);
		}
		else M[num[j]] = dp[j];
	}
	printf("%d\n", dp[n]);
	return 0;
}