#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = 1000000000;
const double PI = acos(-1);
string S, str[1000000];
bitset<26> bi = {}, B[1000000] = {};
LL dp[1 << 26];
char c;
int main() {
  cin >> S;
  for (LL i = 0; i < S.size(); i++) {
    if (i > 0) B[i] = B[i - 1];
    B[i][S[i] - 'a'].flip();
  }
  for (LL i = 0; i < (1 << 26); i++) dp[i] = INF;
  dp[0] = 0;
  for (LL i = 0; i < S.size(); i++) {
    LL BB = B[i].to_ullong();
    if (B[i].count() < 2) {
      dp[BB] = 1;
      continue;
    }
    for (int j = 0; j < 26; j++) {
      dp[BB] = min(dp[BB ^ (1 << j)] + 1, dp[BB]);
    }
  }
  LL Bi = B[S.size() - 1].to_ullong();
  cout << dp[Bi] << endl;
  return 0;
}
