Let's define S(x) to be the sum of digits of number x written in decimal system. For example, S(5) = 5, S(10) = 1, S(322) = 7.

We will call an integer x interesting if S(x + 1) < S(x). In each test you will be given one integer n. Your task is to calculate the number of integers x such that 1 ≤ x ≤ n and x is interesting.

Input

The first line contains one integer t (1 ≤ t ≤ 1000) — number of test cases.

Then t lines follow, the i-th line contains one integer n (1 ≤ n ≤ 10^9) for the i-th test case.

Output

Print t integers, the i-th should be the answer for the i-th test case.

Example

Input


5
1
9
10
34
880055535


Output


0
1
1
3
88005553

Note

The first interesting number is equal to 9.
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.util.* ;
import java.math.*;
import java.io.*;


 public class javaTemplate {
	
	public static final int M = 1000000007 ;
	static FastReader sc = new FastReader();
	public static final int N = 100000000 ;
	static boolean globB[] = new boolean[N+1] ;
	static int globA[] = new int[10000000] ;
	
	
	public static void main(String[] args) {
		
		
		
		
int t = sc.nextInt() ;
		
		while(t -- != 0) {
			int n = sc.nextInt() ;
			System.out.println((n+1)/10);
		}
		
		
		
	}
	


	
	

	
	
			
	
	
	
	


	
	
//_________________________//Template//_____________________________________________________________________
	
	
		//		FAST I/O
		static class FastReader {
	        BufferedReader br;
	        StringTokenizer st;
	        
	        public FastReader()
	        {
	            br = new BufferedReader(
	                new InputStreamReader(System.in));
	        }
	 
	        String next()
	        {
	            while (st == null || !st.hasMoreElements()) {
	                try {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException e) {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();
	        }
	 
	        int nextInt() { return Integer.parseInt(next()); }
	 
	        long nextLong() { return Long.parseLong(next()); }
	 
	        double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }
	 
	        String nextLine()
	        {
	            String str = "";
	            try {
	                str = br.readLine();
	            }
	            catch (IOException e) {
	                e.printStackTrace();
	            }
	            return str;
	        }
		}
	
	
		
		
		
		// Sorting
		public static void sort(int[] arr) {
	        //because Arrays.sort() uses quicksort which is dumb
	        //Collections.sort() uses merge sort
	        ArrayList<Integer> ls = new ArrayList<Integer>();
	        for(int x: arr)
	            ls.add(x);
	        Collections.sort(ls);
	        for(int i=0; i < arr.length; i++)
	            arr[i] = ls.get(i);
	    }
		
		
		
		
		
		// Modulo
		static int mod(int a) {
		   return (a%M + M) % M;
		}
		
		
		
		
		
		
		
		//		Palindrom or Not
		static boolean isPalindrome(String str, int low, int high) {
					while (low < high) {
						if (str.charAt(low) != str.charAt(high)) return false;
					 	low++;
					 	high--;
					}
					return true;
				}
	
	

	
	
	
	
	
	
	
	
		// check if sorted or not	
		public static boolean isSorted(int[] a)
	    {
	        for (int i = 0; i < a.length - 1; i++)
	        {
	            if (a[i] > a[i + 1]) {
	                return false;
	            }
	        }
	        return true;
	    }
	
	
	
		
		
	
		// GCD
		public static int GCD(int a , int b) {
				if(b == 0) return a ;
				
				return GCD(b, a%b) ;
			}
	
		
		
		
		
		// sieve
		public static void sieve() {
			Arrays.fill(globB, true);
			globB[0] = false ;
			globB[1] = false ;
			for(int i = 2 ; i * i <= N ; i++) {
				if(globB[i]) {
				for(int j = i * i ; j<= N ; j+= i) {
					globB[j] = false ;
				 }
				}
			}
			
		}

		
		
		
		// fastPower
		public static long fastPowerModulo(long a, long b, long n) {
			long res = 1 ;
			while(b > 0) {
			if((b&1) != 0) {
				res = (res * a % n) % n ;
			}
			a = (a % n * a % n) % n ;
			b = b >> 1 ;
			}
			return res ;
		}
	
		
		
        // LCM
		static int LCM(int a, int b)
	    {
	        return (a / GCD(a, b)) * b;
	    }
		

}



