#include <bits/stdc++.h>
using namespace std;
struct P {
  int x, y, z;
  bool operator<(const P &a) const { return x > a.x; }
};
struct S {
  int x, y;
};
vector<int> v;
int a, b, c, n, m, i, o[200055], k, d, e, dy[15] = {0, 0, -1, 1, -1, 1, -1, 1},
                                          dx[15] = {-1, 1, 0, 0, 1, 1, -1, -1};
int l[201115];
S u[201010];
int j[1 << 26];
queue<int> q;
long long x, y = 0, z[99];
set<int> s;
string r, r1;
bool as(S a, S b) { return a.x < b.x; }
int f(int a) {
  int n = 1, m = r.size();
  for (; n < m;) {
    int h = (n + m) / 2;
    if (u[h].x >= a)
      m = h;
    else
      n = h + 1;
  }
  return n;
}
int main() {
  cin >> r;
  for (int t = 0; t < r.size(); t++) {
    l[t] = 987654321;
    i ^= (1 << (r[t] - 'a'));
    o[t + 1] = i;
    j[i] = 1;
    u[t + 1] = {i, t + 1};
    if (i == 0) b = max(b, t + 1);
  }
  sort(u + 1, u + 1 + r.size(), as);
  if (b == r.size()) {
    puts("1");
    return 0;
  }
  l[r.size()] = 987654321;
  i = 0;
  l[0] = 0;
  q.push(0);
  for (int t = 1; u[t].x == 0; t++) {
    l[u[t].y] = 0;
    q.push(u[t].y);
  }
  for (; q.size(); q.pop()) {
    int i = o[q.front()];
    for (int t = 'a'; t <= 'z'; t++) {
      int h = (i ^ (1 << (t - 'a')));
      if (j[h] == 0) goto asdf;
      n = f(h);
      for (; u[n].x == h; n++)
        if (l[u[n].y] > l[q.front()] + 1) {
          l[u[n].y] = l[q.front()] + 1;
          q.push(u[n].y);
        }
    asdf:;
    }
  }
  printf("%d", l[r.size()]);
  return 0;
}
