Let's denote a function f(x) in such a way: we add 1 to x, then, while there is at least one trailing zero in the resulting number, we remove that zero. For example, 

  * f(599) = 6: 599 + 1 = 600 → 60 → 6; 
  * f(7) = 8: 7 + 1 = 8; 
  * f(9) = 1: 9 + 1 = 10 → 1; 
  * f(10099) = 101: 10099 + 1 = 10100 → 1010 → 101. 



We say that some number y is reachable from x if we can apply function f to x some (possibly zero) times so that we get y as a result. For example, 102 is reachable from 10098 because f(f(f(10098))) = f(f(10099)) = f(101) = 102; and any number is reachable from itself.

You are given a number n; your task is to count how many different numbers are reachable from n.

Input

The first line contains one integer n (1 ≤ n ≤ 10^9).

Output

Print one integer: the number of different numbers that are reachable from n.

Examples

Input


1098


Output


20


Input


10


Output


19

Note

The numbers that are reachable from 1098 are:

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1098, 1099.
#include <bits/stdc++.h>
using namespace std;
double tick() {
  static clock_t oldt;
  clock_t newt = clock();
  double diff = 1.0 * (newt - oldt) / CLOCKS_PER_SEC;
  oldt = newt;
  return diff;
}
template <typename T>
T gcd(T a, T b) {
  return (b ? __gcd(a, b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
const int MAX = 1e5 + 5;
const int LIM = 100e5 + 5;
const int MOD = 1e9 + 7;
const long double EPS = 1e-10;
const long long LLINF = 5011501150111LL;
const double PI = acos(-1.0);
long long int power(long long int a, long long int p, long long int mod) {
  long long int result = 1;
  if (p == 0) return 1;
  if (p == 1) return a;
  while (p) {
    if (p & 1) result *= a;
    result %= mod;
    p >>= 1;
    a *= a;
    a %= mod;
  }
  return result;
}
vector<long long> s;
void primeFactors(long long n) {
  while (n % 2 == 0) {
    s.push_back(2);
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      s.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) s.push_back(n);
}
vector<long long> printDivisors(long long n) {
  vector<long long> v;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(n / i);
        v.push_back(i);
      }
    }
  }
  return v;
}
template <class T>
inline T square(T value) {
  return value * value;
}
double intlog(double base, double x) {
  return (double)((double)log(x) / (double)log(base));
}
int N, M, cost[51], curr_min;
long long answer = 1;
bool visited[51];
vector<int> adj[51];
void dfs(int node) {
  if (!visited[node]) {
    visited[node] = true;
    for (int i : adj[node]) {
      dfs(i);
    }
  }
}
bool isPowerOfTwo(int x) {
  x++;
  return x && (!(x & (x - 1)));
}
int main() {
  int n;
  cin >> n;
  int count = 1;
  set<int> s;
  s.insert(n);
  while (1) {
    int p_size = s.size();
    n = n + 1;
    while (n % 10 == 0) n = n / 10;
    s.insert(n);
    if (s.size() == p_size) break;
    count++;
  }
  cout << count << endl;
}
