#include <bits/stdc++.h>
using namespace std;
int inf = 1e9;
int mod = 1e9 + 7;
signed main() {
  string s;
  cin >> s;
  int cnt[26] = {};
  for (int i = 0; i < (int)s.length(); i++) {
    cnt[s[i] - 'a']++;
  }
  cnt[s[0] - 'a'] = 1;
  int ans = 1;
  for (int i = 0; i < 26; i++) {
    if (cnt[i]) {
      ans *= cnt[i];
    }
  }
  cout << ans << "\n";
  return 0;
}
