#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
uint bitcount32(uint bits) {
  bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
  bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
  bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
  bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
  bits = (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff);
  return bits;
}
class Area {
 public:
  int end, start;
  Area(int end, int start) : end(end), start(start){};
  bool operator<(const Area& other) const {
    if (end != other.end) return end < other.end;
    return start < other.start;
  }
  bool operator>(const Area& other) const {
    if (end != other.end) return end > other.end;
    return start > other.start;
  }
};
class Int2 {
 public:
  int x, y;
  Int2(){};
  Int2(int x, int y) : x(x), y(y){};
  bool operator<(const Int2& other) const {
    if (x != other.x) return x < other.x;
    return y < other.y;
  }
  bool operator>(const Int2& other) const {
    if (x != other.x) return x > other.x;
    return y > other.y;
  }
};
int main() {
  char s[200002];
  scanf("%s", s + 1);
  int n;
  for (n = 1; s[n] != 0; n++)
    ;
  Int2 count[200001];
  count[0].x = 0;
  count[0].y = 0;
  for (int i = 1; i < n; i++) {
    count[i].x = count[i - 1].x ^ (0x1u << (s[i] - 'a'));
    count[i].y = i;
  }
  sort(count, count + n);
  vector<Area> kaibun;
  for (int i = 0; i < n; i++) {
    if (count[i].x == count[i + 1].x)
      kaibun.emplace_back(count[i + 1].y, count[i].y);
    for (int j = 0; j < 26; j++) {
      int obj = count[i].x ^ (0x1 << j);
      Int2* point = lower_bound(count, count + n, Int2(obj, 0));
      if (point == count + n) continue;
      if (point[0].x == obj) {
        int in = min(count[i].y, point[0].y), ax = max(count[i].y, point[0].y);
        kaibun.emplace_back(ax, in);
      }
    }
  }
  int best[200001];
  for (int i = 0; i < n; i++) best[i] = i;
  sort(kaibun.begin(), kaibun.end());
  for (auto kai : kaibun)
    best[kai.end] = min(best[kai.end], best[kai.start] + 1);
  printf("%d\n", best[n - 1]);
}
