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 javax.swing.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class A {
    static ArrayList<Integer> [] adj;
    static ArrayList<Integer> temp;
    static int mod = (int) 1e9+7;
    static boolean[] vis = new boolean[(int)1e5];

    static int nCr(int n, int k)
    {
        return (int) (fact(n) * (long) fast_pow(fact(k), mod - 2) % mod * (long)fast_pow(fact(n - k), mod - 2) % mod);
    }
    static long fast_pow(long a, long p) {
        long res = 1;
        while (p>0) {
            if (p % 2 == 0) {
                a = ((a *(long)a) % mod);
                p /= 2;
            } else {
                res = (res *(long)a) % mod;
                p--;
            }
        }
        return res;
    }
    // Returns factorial of n
    static long fact(long n)
    {
        long res = 1;
        for (long i = 2; i <= n; i++)
            res = (res *(long) i)%mod;
        return res;
    }
    public static void main(String[] args) throws IOException {
        FastScanner s=new FastScanner();
          int t = s.nextInt();
//        int t = 1;
        while(t-->0) {
            long n = s.nextLong();
            if(n<9) System.out.println(0);
            else {
                if(n%10==9)System.out.println(n/10+1);
                else System.out.println(n/10);
            }
        }
    }
    static void dfs(int i){
        vis[i]=true;
        temp.add(i);
        List<Integer> Y = adj[i];
        for(int x:Y){
            if(!vis[x])dfs(x);
        }
    }

    static int lower_bound(int[] arr, int x) {
        int low_limit = 0, high_limit = arr.length, mid = -1;
        while (low_limit < high_limit) {
            mid = (low_limit + high_limit) / 2;
            if (arr[mid] >= x) {
                high_limit = mid;
            } else {
                low_limit = mid + 1;
            }
        }
        return low_limit + 1;
    }

    static long gcd(long a, long b) throws IOException {
        return (b == 0) ? a : gcd(b, a % b);
    }

    static int gcd(int a, int b) throws IOException {
        return (b == 0) ? a : gcd(b, a % b);
    }

    static void sortr(int[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l, Collections.reverseOrder());
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static void sort(int[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static void sort(long[] a) {
        ArrayList<Long> l = new ArrayList<>();
        for (long i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
