#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)< st; int main(){ cin>>s; sort(ALL(s)); do{ st.insert(s); }while(next_permutation(ALL(s))); p(st.size()-1); }