#include <bits/stdc++.h>
using namespace std;
constexpr long long INF = 1e18;
template <class T>
inline bool CHMAX(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool CHMIN(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
class HashVI {
 public:
  size_t operator()(const vector<long long> &x) const {
    const long long C = 997;
    size_t t = 0;
    for (long long i = 0; i != x.size(); ++i) {
      t = t * C + x[i] % 997;
    }
    return t;
  }
};
signed main() {
  string s;
  cin >> s;
  auto f = [&](string s) {
    unordered_map<vector<long long>, long long, HashVI> mp;
    auto v = vector<long long>(26, 0);
    for (long long i = (0); i < (long long)(s.size()); i++) {
      v[s[i] - 'a'] ^= 1;
      mp[v] = i;
    }
    auto dp = vector<long long>(s.size() + 1, INF);
    dp[0] = 0;
    auto tmp = vector<long long>(26, 0);
    for (long long i = (0); i < (long long)(s.size()); i++) {
      for (long long j = (0); j < (long long)(26); j++) {
        tmp[j] ^= 1;
        if (mp.count(tmp)) CHMIN(dp[mp[tmp] + 1], dp[i] + 1);
        tmp[j] ^= 1;
      }
      tmp[s[i] - 'a'] ^= 1;
    }
    return dp[s.size()];
  };
  long long ans = f(s);
  reverse(s.begin(), s.end());
  CHMIN(ans, f(s));
  auto cnt = vector<long long>(26, 0);
  for (long long i = (0); i < (long long)(s.size()); i++) cnt[s[i] - 'a'] ^= 1;
  long long flg = 1;
  for (long long i = (0); i < (long long)(cnt.size()); i++)
    if (cnt[i] & 1) flg = 0;
  if (flg)
    cout << 1 << endl;
  else
    cout << ans << endl;
}
