#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3FFFFFFF;
const long long INFLL = 0x3FFFFFFF3FFFFFFF;
const double INFD = 1.0e+308;
const double EPS = 1.0e-9;
template <class T, class U>
istream& operator>>(istream& ist, pair<T, U>& right) {
  return ist >> right.first >> right.second;
}
template <class T, class U>
ostream& operator<<(ostream& ost, const pair<T, U>& right) {
  return ost << right.first << ' ' << right.second;
}
template <class T, class TCompatible, size_t N>
void Fill(T (&dest)[N], const TCompatible& val) {
  fill(begin(dest), end(dest), val);
}
template <class T, class TCompatible, size_t M, size_t N>
void Fill(T (&dest)[M][N], const TCompatible& val) {
  for (int i = 0; i < M; ++i) Fill(dest[i], val);
}
template <typename T>
using PriorityQ = priority_queue<T, vector<T>, greater<T> >;
string s;
vector<pair<long long, long long> > R;
vector<int> sum;
int H[200001];
pair<long long, long long> HH[200001];
template <class Pair>
struct CompBySecond {
  bool operator()(const Pair& left, const Pair& right) {
    return left.second < right.second ||
           (left.second == right.second && left.first < right.first);
  }
};
int DP[200001];
int main() {
  cin >> s;
  int N = s.size();
  for (int i = (0); i < (int)(N); ++i) {
    H[i + 1] = H[i] ^ (1 << (s[i] - 'a'));
  }
  if (H[N] == H[0]) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = (0); i < (int)(N + 1); ++i) {
    HH[i] = pair<long long, long long>(H[i], i);
  }
  stable_sort(HH, HH + N + 1);
  for (int i = (0); i < (int)(N + 1); ++i) {
    for (int c = (0); c < (int)(26); ++c) {
      int ref = H[i] ^ (1 << c);
      auto it = lower_bound(HH, HH + N + 1,
                            pair<long long, long long>(ref + 1, -INF)) -
                1;
      if (it->second > i && it->first == ref) {
        R.push_back(pair<long long, long long>(i, it->second));
      }
    }
  }
  sort(R.begin(), R.end(), CompBySecond<pair<long long, long long> >());
  Fill(DP, INF);
  DP[0] = 0;
  int p = 0;
  for (int i = (1); i < (int)(N + 1); ++i) {
    while (p < R.size() && R[p].second == i) {
      DP[i] = min(DP[i], DP[R[p].first] + 1);
      ++p;
    }
  }
  cout << DP[N] << endl;
  return 0;
}
