#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; cout << 9*(s.size()+1) << endl; }