#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmin(T& a, T const& b) {
  if (b < a) a = b;
}
using ll = long long;
const ll mod = LLONG_MAX;
string s;
long long imos[200010][30];
long long ret;
long long ans = 1;
long long memo = -1;
vector<long long> vec;
queue<long long> memoqueue;
long long Ans = 1e9;
long long dfs(long long memo) {
  ret = 0;
  vec.clear();
  for (long long j = 0; j < 26; j++) {
    if ((imos[s.size() - 1][j] - imos[memo][j]) % 2 != 0) {
      vec.push_back(j);
      ret++;
    }
  }
  if (ret >= 2) {
    ans++;
  } else {
    Ans = ans;
    return Ans;
  }
  for (long long i = memo + 1; i < s.size(); i++) {
    for (long long j = 0; j < vec.size(); j++) {
      char temp = vec[j] + 'a';
      if (s[i] == temp) {
        dfs(memo);
        goto F2;
      }
    }
  }
F2:;
}
signed main() {
  cin >> s;
  for (long long i = 0; i < 26; i++) {
    char alpha = 'a';
    char temp = alpha + i;
    for (long long j = 0; j < s.size(); j++) {
      if (j > 0) imos[j][i] += imos[j - 1][i];
      if (s[j] == temp) imos[j][i]++;
    }
  }
  while (1) {
    if (memo != -1) {
      while (memoqueue.size() != 0) {
        memo = memoqueue.front();
        memoqueue.pop();
        Ans = min(Ans, dfs(memo));
      }
    } else {
      ret = 0;
      vec.clear();
      for (long long j = 0; j < 26; j++) {
        if ((imos[s.size() - 1][j]) % 2 != 0) {
          vec.push_back(j);
          ret++;
        }
      }
      if (ret >= 2) {
        ans++;
      } else {
        cout << ans << endl;
        return 0;
      }
      for (long long i = 0; i < s.size(); i++) {
        for (long long j = 0; j < vec.size(); j++) {
          char temp = vec[j] + 'a';
          if (s[i] == temp) {
            memo = i;
            memoqueue.push(i);
            goto F;
          }
        }
      }
    F:;
    }
  }
E:;
  cout << Ans << endl;
}
