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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class CF_1553_A {


    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        Integer n = getInt(br);

        for (int i = 0; i < n; i++) {
            Integer e = getInt(br);

            Integer ans = e / 10;

            if (e % 10 == 9) {
                ans++;
            }


            System.out.println(ans);


        }


    }

    private static Set<Integer> process(Set<Integer> aa) {
        List<Integer> arr = new ArrayList<>();
        arr.addAll(aa);
        Set<Integer> diff = new HashSet<>();
        for (int j = 0; j < arr.size(); j++) {
            for (int k = j + 1; k < arr.size(); k++) {
                diff.add(Math.abs(arr.get(j) - arr.get(k)));
            }
        }
        Set<Integer> tba = new HashSet<>();
        for (Integer a : diff) {
            if (!aa.contains(a)) {
                tba.add(a);
            }
        }
        return tba;
    }

    private static boolean containsNeg(List<Integer> arr) {
        for (int i : arr) {
            if (i < 0) {
                return true;
            }
        }
        return false;
    }

    private static List<Integer> getIntList(BufferedReader br) throws IOException {
        String[] str = br.readLine().trim().split(" ");
        List<Integer> arr = new ArrayList<>();
        for (int i = 0; i < str.length; i++) {
            arr.add(Integer.valueOf(str[i].trim()));
        }
        return arr;
    }

    private static Integer getInt(BufferedReader br) throws IOException {
        return Integer.valueOf(br.readLine().trim());
    }


}
