#include <bits/stdc++.h>
using namespace std;
struct P {
  int x, y;
  bool operator<(const P &a) const { return x > a.x; }
};
vector<P> v[1010];
int a, b, c, o[1 << 26], i, k, d, n, m, e, dy[15] = {0, 0, -1, 1, -1, 1, -1, 1},
                                           dx[15] = {-1, 1, 0, 0, 1, 1, -1, -1};
int l[300005];
long long x, y, z[52], v1, v2;
queue<int> q, q1;
string r;
int main() {
  cin >> r;
  for (int t = 1; t <= r.size(); t++) {
    l[t] = 987654321;
    i ^= (1 << (r[t - 1] - 'a'));
    o[i] = max(t, o[i]);
  }
  l[0] = 0;
  l[o[0]] = 0;
  q.push(0);
  q.push(o[0]);
  for (; q.size(); q.pop()) {
    for (int u = 1; u <= 1 << ('z' - 'a'); u <<= 1)
      if (l[o[q.front()]] + 1 < l[o[q.front() ^ u]]) {
        l[o[q.front() ^ u]] = l[o[q.front()]] + 1;
        q.push(q.front() ^ u);
      }
  }
  printf("%d", l[r.size()]);
}
