#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
const long long big = 1000000007ll;
const long long big2 = 1000000009ll;
long long n, m, k, q, w, h, T;
string s;
int MASK[(1 << 26)] = {0};
int ANS[(1 << 26)] = {0};
long long DP[200001] = {0};
vector<long long> A;
long long dp(long long i) {
  if (i == n) return 0;
  if (DP[i] != 0) return DP[i];
  long long a = A[i];
  long long ans = big;
  if (MASK[a] > i) {
    ans = 1 + dp(MASK[a]);
  }
  for (long long c1 = 0; c1 < 26; c1++) {
    long long b = a ^ (1 << c1);
    if (MASK[b] > i) {
      ans = min(ans, 1 + dp(MASK[b]));
    }
  }
  DP[i] = ans;
  return ans;
}
int main() {
  long long a, b, c, d;
  cin >> s;
  n = s.length();
  long long F[26] = {0};
  long long mask = 0;
  for (long long c1 = 0; c1 < n; c1++) {
    MASK[mask] = c1;
    a = s[c1] - 'a';
    A.push_back(mask);
    mask ^= (1 << a);
  }
  MASK[mask] = n;
  for (long long c1 = 0; c1 < (1 << 26); c1++) {
    ANS[c1] = big;
  }
  ANS[0] = 0;
  for (long long c1 = 0; c1 < n; c1++) {
    a = A[c1];
    for (long long c2 = 0; c2 < 26; c2++) {
      b = a ^ (1 << c2);
      ANS[a] = min(ANS[a], 1 + ANS[b]);
    }
  }
  int ans = 1 + ANS[mask];
  for (long long c1 = 0; c1 < 26; c1++) {
    ans = min(ans, 1 + ANS[mask ^ (1 << c1)]);
  }
  cout << ans << "\n";
  return 0;
}
