#include <bits/stdc++.h>
using namespace std;
string s;
long long cc[28][200011];
string ss[200011];
long long dp[200011];
map<string, int> m;
int main() {
  cin >> s;
  for (int i = 0; i < (28); i++) {
    for (int j = 0; j < (200011); j++) {
      cc[i][j] = 0;
    }
  }
  for (int i = 1; i <= s.size(); i++) {
    for (int j = 0; j < (28); j++) {
      cc[j][i] = cc[j][i - 1];
    }
    cc[s[i - 1] - 'a'][i]++;
    cc[s[i - 1] - 'a'][i] %= 2;
  }
  for (int i = 1; i <= s.size(); i++) {
    for (int j = 0; j < (28); j++) {
      if (cc[j][i] % 2 == 1) {
        ss[i].push_back('a' + j);
      }
    }
    sort(ss[i].begin(), ss[i].end());
  }
  for (int i = 1; i <= s.size(); i++) {
    if (ss[i] == "") {
      dp[i] = 1;
      m[ss[i]] = i;
      continue;
    }
    if (ss[i].size() == 1) {
      dp[i] = 1;
      m[ss[i]] = i;
      continue;
    }
    dp[i] = 1e10;
    for (int j = 0; j < (ss[i].size()); j++) {
      string sx = "";
      for (int k = 0; k < (ss[i].size()); k++) {
        if (j == k) continue;
        sx.push_back(ss[i][k]);
      }
      if (m[sx] != 0) {
        dp[i] = min(dp[i], dp[m[sx]] + 1);
      }
    }
    m[ss[i]] = i;
  }
  cout << dp[s.size()] << endl;
  return (0);
}
