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.
// Working program using Reader Class 
import java.io.*;
import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.*; 

public class Main 
{ 
	static class Reader 
	{ 
		final private int BUFFER_SIZE = 1 << 16; 
		private DataInputStream din; 
		private byte[] buffer; 
		private int bufferPointer, bytesRead; 

		public Reader() 
		{ 
			din = new DataInputStream(System.in); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public Reader(String file_name) throws IOException 
		{ 
			din = new DataInputStream(new FileInputStream(file_name)); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public String readLine() throws IOException 
		{ 
			byte[] buf = new byte[64]; // line length 
			int cnt = 0, c; 
			while ((c = read()) != -1) 
			{ 
				if (c == '\n') 
					break; 
				buf[cnt++] = (byte) c; 
			} 
			return new String(buf, 0, cnt); 
		} 

		public int nextInt() throws IOException 
		{ 
			int ret = 0; 
			byte c = read(); 

			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do
			{ 
				ret = ret * 10 + c - '0'; 
			} while ((c = read()) >= '0' && c <= '9'); 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		public long nextLong() throws IOException 
		{ 
			long ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 
			if (neg) 
				return -ret; 
			return ret; 
		} 

		public double nextDouble() throws IOException 
		{ 
			double ret = 0, div = 1; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 

			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 

			if (c == '.') 
			{ 
				while ((c = read()) >= '0' && c <= '9') 
				{ 
					ret += (c - '0') / (div *= 10); 
				} 
			} 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		private void fillBuffer() throws IOException 
		{ 
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
			if (bytesRead == -1) 
				buffer[0] = -1; 
		} 

		private byte read() throws IOException 
		{ 
			if (bufferPointer == bytesRead) 
				fillBuffer(); 
			return buffer[bufferPointer++]; 
		} 

		public void close() throws IOException 
		{ 
			if (din == null) 
				return; 
			din.close(); 
		} 
	} 
	
	public static long power(long l, long m,long p) 
    { 
		//long p=mod;
        // Initialize result 
        long res = 1;      
         
        // Update x if it is more   
        // than or equal to p 
        l = l % p;  
      
        while (m > 0) 
        { 
            // If y is odd, multiply x 
            // with result 
            if((m & 1)==1) 
                res = (res * l) % p; 
      
            // y must be even now 
            // y = y / 2 
            m = m >> 1;  
            l = (l * l) % p;  
        } 
        return (long)res; 
    } 
	
	public static long mod=998244353;
	
	public static int gcd(int a, int b) 
    { 
      if (b == 0) 
        return a; 
      return gcd(b, a % b);  
    }
	
	public static long modMult(long a,long b) {
		return ((a%mod)*(b%mod))%mod;
	}
	
	public static long modAdd(long a,long b) {
		return ((a%mod)+(b%mod))%mod;
	}
	
	public static void main(String[] args) throws IOException 
	{ 
		Reader scan=new Reader();
		PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
		long n=scan.nextLong();
		if(n<10) {
			out.println(9);
			out.close();
		}
		n++;
		long count=0;
		while(n/10!=0) {
			if(n%10==0) {
				n/=10;
				continue;
			}
			else {
				long x=n/10+1;
				count+=x*10-n;
				n=x*10;
			}
		}
		count+=10;
		out.print(count);
		out.close();
	} 
} 