#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007, MAX = 200003, INF = 1 << 30;
int dp[MAX];
int main() {
  string S;
  cin >> S;
  vector<int> T(26, 0);
  vector<vector<int>> data(S.size() + 1, vector<int>(26, 0));
  map<vector<int>, int> MA;
  for (int i = 0; i < S.size(); i++) {
    T[S[i] - 'a'] ^= 1;
    data[i + 1] = T;
    MA[T] = i + 1;
  }
  int cnt = 0;
  for (int i = 0; i < 26; i++) T[i] = 0;
  dp[0] = 0;
  for (int i = 1; i <= S.size(); i++) dp[i] = INF;
  for (int i = 0; i < S.size(); i++) {
    if (i < MA[data[i]]) dp[MA[data[i]]] = min(dp[MA[data[i]]], dp[i] + 1);
    for (int j = 0; j < 26; j++) {
      data[i][j] ^= 1;
      if (i < MA[data[i]]) dp[MA[data[i]]] = min(dp[MA[data[i]]], dp[i] + 1);
      data[i][j] ^= 1;
    }
  }
  cout << dp[S.size()] << endl;
}
