#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int maxn = 1e5 + 5;
const double EPS = 1e-6;
using namespace std;
char s[2 * maxn];
int pre[2 * maxn][26];
int hou[2 * maxn][26];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  if (len == 1) return printf("1\n"), 0;
  memset(pre[0], 0, sizeof(pre[0]));
  for (int i = 1; i < (len + 1); ++i) {
    for (int k = 0; k < (26); ++k)
      if (s[i - 1] - 'a' == k)
        pre[i][k] = pre[i - 1][k] + 1;
      else
        pre[i][k] = pre[i - 1][k];
  }
  for (int i = len; i >= (1); --i) {
    for (int k = 0; k < (26); ++k)
      if (s[i - 1] - 'a' == k)
        hou[i][k] = hou[i + 1][k] + 1;
      else
        hou[i][k] = hou[i + 1][k];
  }
  int ans = 0;
  for (int i = 1; i < (len + 1); ++i) {
    for (int j = len; j >= (i); --j) {
      int fg = 0;
      for (int k = 0; k < (26); ++k) {
        if ((pre[j][k] - pre[i - 1][k]) % 2 == 1) fg++;
        if (fg >= 2) break;
      }
      if (fg <= 1) {
        i = j;
        ans++;
        break;
      }
    }
  }
  int ans1 = 0;
  for (int i = len; i >= (1); --i) {
    for (int j = 1; j < (len + 1); ++j) {
      int fg = 0;
      for (int k = 0; k < (26); ++k) {
        if ((hou[j][k] - hou[i + 1][k]) % 2 == 1) fg++;
        if (fg >= 2) break;
      }
      if (fg <= 1) {
        i = j;
        ans1++;
        break;
      }
    }
  }
  ans = min(ans, ans1);
  printf("%d", ans);
  return 0;
}
