#include <bits/stdc++.h>
using namespace std;
bool now[26];
bool nnow[200005][26];
bool nn[26];
string s;
vector<int> p;
int ss;
int ans;
int nex;
vector<int> dp[2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2]
              [2][2][2][2];
int main() {
  cin >> s;
  ss = s.size();
  for (int i = (0); (i) < (ss); (i)++) {
    int k = (int)(s[i] - 'a');
    now[k] = 1 - now[k];
    for (int j = (0); (j) < (26); (j)++) nnow[i + 1][j] = now[j];
    dp[now[0]][now[1]][now[2]][now[3]][now[4]][now[5]][now[6]][now[7]][now[8]]
      [now[9]][now[10]][now[11]][now[12]][now[13]][now[14]][now[15]][now[16]]
      [now[17]][now[18]][now[19]][now[20]][now[21]][now[22]][now[23]][now[24]]
      [now[25]]
          .push_back(i + 1);
  }
  for (int i = (0); (i) < (ss); (i)++) {
    nex = 0;
    for (int j = (0); (j) < (26); (j)++) nn[j] = now[j];
    p = dp[nn[0]][nn[1]][nn[2]][nn[3]][nn[4]][nn[5]][nn[6]][nn[7]][nn[8]][nn[9]]
          [nn[10]][nn[11]][nn[12]][nn[13]][nn[14]][nn[15]][nn[16]][nn[17]]
          [nn[18]][nn[19]][nn[20]][nn[21]][nn[22]][nn[23]][nn[24]][nn[25]];
    for (int h = (0); (h) < (p.size()); (h)++) {
      if (nex < p[h]) nex = p[h];
    }
    for (int j = (0); (j) < (26); (j)++) {
      nn[j] = 1 - nn[j];
      p = dp[nn[0]][nn[1]][nn[2]][nn[3]][nn[4]][nn[5]][nn[6]][nn[7]][nn[8]]
            [nn[9]][nn[10]][nn[11]][nn[12]][nn[13]][nn[14]][nn[15]][nn[16]]
            [nn[17]][nn[18]][nn[19]][nn[20]][nn[21]][nn[22]][nn[23]][nn[24]]
            [nn[25]];
      for (int h = (0); (h) < (p.size()); (h)++) {
        if (nex < p[h]) nex = p[h];
      }
      nn[j] = 1 - nn[j];
    }
    i = nex - 1;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
