#include <bits/stdc++.h>
using namespace std;
string s;
int c[200002][30];
int dp[200002];
int mem[134217730];
int INF = 1e9;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); ++i) dp[i] = INF;
  for (int i = 0; i < 134217730; ++i) mem[i] = INF;
  c[0][s[0] - 'a'] = 1;
  for (int i = 1; i < s.size(); ++i) {
    for (int j = 0; j <= 'z' - 'a'; ++j) {
      c[i][j] = c[i - 1][j];
      if (s[i] == 'a' + j) c[i][j] = (c[i][j] + 1) % 2;
    }
  }
  dp[0] = 1;
  mem[(1 << (s[0] - 'a'))] = 1;
  for (int i = 1; i < s.size(); ++i) {
    int sum = 0;
    int index = 0;
    for (int j = 0; j <= 'z' - 'a'; ++j) {
      sum += c[i][j];
      if (c[i][j] == 1) {
        index |= (1 << j);
      }
    }
    if (i % 2 == 0 && sum == 1)
      dp[i] = 1;
    else if (i % 2 == 1 && sum == 0)
      dp[i] = 1;
    else
      dp[i] = dp[i - 1] + 1;
    dp[i] = min(dp[i], mem[index] + 1);
    for (int j = 0; j <= 'z' - 'a'; ++j) {
      if (index & (1 << j) == 0) continue;
      dp[i] = min(dp[i], mem[index & ~(1 << j)] + 1);
    }
    mem[index] = min(mem[index], dp[i]);
  }
  cout << dp[s.size() - 1] << endl;
  return 0;
}
