Problem:
Score : 700 points

Problem Statement

We have a string s consisting of lowercase English letters.
Snuke is partitioning s into some number of non-empty substrings.
Let the subtrings obtained be s_1, s_2, ..., s_N from left to right. (Here, s = s_1 + s_2 + ... + s_N holds.)
Snuke wants to satisfy the following condition:

For each i (1 \leq i \leq N), it is possible to permute the characters in s_i and obtain a palindrome.

Find the minimum possible value of N when the partition satisfies the condition.

Constraints

1 \leq |s| \leq 2 \times 10^5

s consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

s

Output

Print the minimum possible value of N when the partition satisfies the condition.

Sample Input 1

aabxyyzz

Sample Output 1

2

The solution is to partition s as aabxyyzz = aab + xyyzz.
Here, aab can be permuted to form a palindrome aba, and xyyzz can be permuted to form a palindrome zyxyz.

Sample Input 2

byebye

Sample Output 2

1

byebye can be permuted to form a palindrome byeeyb.

Sample Input 3

abcdefghijklmnopqrstuvwxyz

Sample Output 3

26

Sample Input 4

abcabcxabcx

Sample Output 4

3

The solution is to partition s as abcabcxabcx = a + b + cabcxabcx.

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include "bits/stdc++.h"
#define MAXN 200009
#define INF 1000000007
#define mp(x,y) make_pair(x,y)
#define all(v) v.begin(),v.end()
#define pb(x) push_back(x)
#define wr cout<<"----------------"<<endl;
#define ppb() pop_back()
#define tr(ii,c) for(__typeof((c).begin()) ii=(c).begin();ii!=(c).end();ii++)
#define ff first
#define ss second
#define my_little_dodge 46
#define debug(x)  cerr<< #x <<" = "<< x<<endl;
using namespace std;

typedef long long ll;
typedef pair<int,int> PII;
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
char s[MAXN];
map<vector<int>,bool>vis;
map<vector<int>,int>dp;
int cnt[28];
int main(){
    //~ freopen("file.in", "r", stdin);
    scanf("%s",s);
    int n=strlen(s),ans=0;
    for(int i=0;i<n;i++)
		cnt[s[i]-'a']++;
	for(int i=0;i<26;i++)
		ans+=cnt[i]&1;
	printf("%d\n",max(1,ans));	
    //~ vector<int>v(26);
    //~ vis[v]=1;dp[v]=0;
    //~ for(int i=0;i<n;i++){
		//~ v[s[i]-'a']^=1;
		//~ if(vis[v])
			//~ continue;
		//~ int ans=INF;
		//~ for(int j=0;j<26;j++){
			//~ v[j]^=1;
			//~ if(vis[v])
				//~ umin(ans,dp[v]+1);
			//~ v[j]^=1;	
		//~ }vis[v]=1;dp[v]=ans;
	//~ }	
	//~ vector<int>tmp(26);
	//~ if(tmp==v)
		//~ puts("1");
	//~ else	
		//~ printf("%d\n",dp[v]);
	return 0;
}