#include <bits/stdc++.h>
using namespace std;
long long ans = 1;
int main() {
  int n;
  cin >> n;
  while (n >= 10) {
    n++;
    while (n % 10 == 0) n /= 10;
    ans++;
  }
  ans += 8;
  cout << ans;
}
