#include <bits/stdc++.h>
using namespace std;
const int N = 150000;
const int M = 12;
const int INF = 0x3f3f3f3f;
const long long MOD = 1e9 + 7;
const double Pi = acos(-1);
int n, m;
char s[N];
int len;
int vis[30];
int dp[N][3];
int sat() {
  memset(vis, 0, sizeof vis);
  memset(dp, 0, sizeof dp);
  dp[0][0] = 1;
  vis[s[0] - 'a']++;
  for (int i = 1; i < len; i++) {
    vis[s[i] - 'a']++;
    int f = 1;
    for (int j = 0; j < 27; j++) {
      if (vis[j] % 2 == 1) f++;
    }
    if (f >= 2) f--;
    dp[i][0] = f;
  }
  memset(vis, 0, sizeof vis);
  dp[len - 1][1] = 1;
  vis[s[len - 1] - 'a']++;
  for (int i = len - 2; i >= 0; i--) {
    vis[s[i] - 'a']++;
    int f = 1;
    for (int j = 0; j < 27; j++) {
      if (vis[j] % 2 == 1) f++;
    }
    if (f >= 2) f--;
    dp[i][1] = f;
  }
  int ans = min(dp[len - 1][0], dp[0][1]);
  for (int i = 0; i < len - 1; i++) ans = min(ans, dp[i][0] + dp[i + 1][1]);
  return ans;
}
int main() {
  while (~scanf("%s", s)) {
    len = strlen(s);
    int ans = sat();
    printf("%d\n", ans);
  }
  return 0;
}
