#include <iostream> #include <set> #include <algorithm> using namespace std; set<string> s; string str,aux; int pos,i,j,k; int main() { cin>>str; for(int pos=2;pos<=9;pos++) for(int i=0;i<10;i++) { aux=str; aux.push_back(0); for(k=9;k>pos;k--)aux[k]=aux[k-1]; aux[pos]=i+'0'; s.insert(aux); } cout<<s.size(); return 0; }