#include using namespace std; string s; set sets; void gets(string a, int left, int right) { if (left == right) { sets.insert(a+s[left]); return; } gets(a + s[left], left + 1, right); gets(a + s[right], left, right - 1); return; } int main() { cin >> s; gets("", 0, s.size() - 1); cout << sets.size() << endl; return 0; }