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 java.util.*;
import java.io.*;
import java.lang.*;
import static java.lang.Math.*;
// import java.math.*;

public class cp{
    static BufferedReader br;
    static StringTokenizer st;

    public static void main(String[] args)throws IOException{

        br = new BufferedReader(new InputStreamReader(System.in));
        List<Integer> answer = new ArrayList<Integer>();

        for(int t=Integer.parseInt(br.readLine()); t>0; t--){

            st = readLine();
            int n = tokenInt();

            answer.add(new Solver().solve(n));

        }

        // ListIterator<Integer> it = answer.listIterator();
        // while (it.hasNext())
        //     System.out.println(it.next());

        for (int ans : answer ) System.out.println(ans);

    }

    static StringTokenizer readLine() throws IOException { return new StringTokenizer(br.readLine()); }
    static int tokenInt() { return Integer.parseInt(st.nextToken()); }
    static long tokenLong(){ return Long.parseLong(st.nextToken()); }
    static double tokenDouble(){ return Double.parseDouble(st.nextToken()); }
    static char[] tokenChar(){ return st.nextToken().toCharArray(); }
    static int[] readIntArray(int n) {
        int[] a=new int[n];
        for (int i=0; i<n; i++) a[i]=tokenInt();
        return a;
    }

    static int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b);}
    static int lcm(int a, int b) { return (a * b) / gcd(a,b);}

    static void printArr(int[] arr){
        for (int i=0; i<arr.length; i++) System.out.print(arr[i] + " ");
        System.out.println();
        return;
    }

    static void printArr(char[] arr){
        for (int i=0; i<arr.length; i++) System.out.print(arr[i] + " ");
        System.out.println();
        return;
    }

}


class Solver{
    public int solve(int n) throws IOException{
        if (n >= 9){
            if (n%10 == 9)
                return (n/10)+1;
            return n/10;
        }
        return 0;
    }
}
