Mishka wants to buy some food in the nearby shop. Initially, he has $s$ burles on his card. 

Mishka can perform the following operation any number of times (possibly, zero): choose some positive integer number $1 \le x \le s$, buy food that costs exactly $x$ burles and obtain $\lfloor\frac{x}{10}\rfloor$ burles as a cashback (in other words, Mishka spends $x$ burles and obtains $\lfloor\frac{x}{10}\rfloor$ back). The operation $\lfloor\frac{a}{b}\rfloor$ means $a$ divided by $b$ rounded down.

It is guaranteed that you can always buy some food that costs $x$ for any possible value of $x$.

Your task is to say the maximum number of burles Mishka can spend if he buys food optimally.

For example, if Mishka has $s=19$ burles then the maximum number of burles he can spend is $21$. Firstly, he can spend $x=10$ burles, obtain $1$ burle as a cashback. Now he has $s=10$ burles, so can spend $x=10$ burles, obtain $1$ burle as a cashback and spend it too.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

The next $t$ lines describe test cases. Each test case is given on a separate line and consists of one integer $s$ ($1 \le s \le 10^9$) — the number of burles Mishka initially has.


-----Output-----

For each test case print the answer on it — the maximum number of burles Mishka can spend if he buys food optimally.


-----Example-----
Input
6
1
10
19
9876
12345
1000000000

Output
1
11
21
10973
13716
1111111111

Difficulty: introductory

Starter code:

Solutions:
import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque
def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return n,b
 
	
def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return n,b,c
 
		
def dv():
	n, m = list(map(int, input().split()))
	return n,m
 
 
def da():
	n, m = list(map(int, input().split()))
	a = list(map(int, input().split()))
	return n,m, a 
 
 
def dva():
	
	n, m = list(map(int, input().split()))
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return n,m,b
 
 
def eratosthenes(n): 
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))
 
 
def lol(lst,k):
	k=k%len(lst)
	ret=[0]*len(lst)
	for i in range(len(lst)):
		if i+k<len(lst) and i+k>=0:
			ret[i]=lst[i+k]
		if i+k>=len(lst):
			ret[i]=lst[i+k-len(lst)]
		if i+k<0:
			ret[i]=lst[i+k+len(lst)]
	return(ret)
def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return n,b,m,c
 
 
def dvs():
	n = int(input())
	m = int(input())
	return n, m 
 

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans


for i in range(int(input())):
	s = int(input())
	ans = 0
	while s >= 10:
		d = s // 10
		ans += d * 10
		s += d
		s -= d * 10
	ans += s
	print(ans)


q = int(input())
for rwwe in range(q):
	n = int(input())
	spent = 0
	while n >= 10:
		x = (n-(n%10))
		spent += x
		n -= x
		n += x//10
	spent += n
	print(spent)

t = int(input())
for i in range(t):
    n = int(input())
    res = 0
    while n > 9:
        res += n // 10 * 10
        n = n // 10 + n % 10
    res += n
    print(res)


for _ in range(int(input())):
    n = int(input())
    ans = 0
    while n >= 10:
        ans += n-n % 10
        n = n//10+n % 10
    print(ans+n)


import sys

# inf = open('input.txt', 'r')
# reader = (line.rstrip() for line in inf)
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

t = int(input())
for _ in range(t):
    s = int(input())
    spent = 0
    while s >= 10:
        cashback = s // 10
        spent += cashback * 10
        s = s % 10 + cashback
    spent += s
    print(spent)

# inf.close()


#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=int(input())
for tt in range(t):
    n=int(input())
    ans=0
    while(n>=10):
        v=(n//10)
        d=(v*10)
        n-=d
        ans+=d
        n+=v
    print(ans+n)
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

for _ in range(int(input())):
    s = int(input())
    k = s
    while s >= 10:
        num = s // 10
        s += s // 10
        s -= num * 10
        k += num
    print(k)

import sys
input = sys.stdin.readline

t=int(input())
for tests in range(t):
    n=int(input())
    
    ANS=0
    while n>=10:
        back=n//10
        buy=back*10

        ANS+=buy
        n-=buy
        n+=back

    print(ANS+n)

    


for _ in range(int(input())):
    n = int(input())
    ans = n + n//9
    if n % 9 == 0:
        ans -= 1
    print(ans)

n = int(input())
for i in range(n):
    num = int(input())
    ost = 0
    out = 0
    while num > 9:
        x = num % 10
        num -= x
        ost = num // 10
        out += num
        num = ost + x
    out += num
    print(out)

def main():
    for _ in range(int(input())):
        n = int(input())
        
        ans = 0
        while n > 0:
            ans += n // 10 * 10
            n = n % 10 + n // 10
            if n // 10 < 1:
                break
        ans += n
        print(ans)
            
            
            
    
    
main()

import math, collections, sys
input = sys.stdin.readline
def case():
    s = int(input())
    ans = 0
    while s:
        spend = (s//10)*10
        if spend == 0:
            spend = s
        ans+=spend
        back = spend//10
        s-=spend
        s+=back
        # print(spend, back, s)
    print(ans)
for _ in range(int(input())):
    case()

t = int(input())
for _ in range(t):
    n = int(input())
    ans = 0
    while n >= 10:
        v = n // 10 * 10
        ans += v
        n = n - v + v // 10
    print(ans + n)


for _ in range(int(input())):
    s = int(input())
    ans = 0
    while s >= 10:
        ans += (s - s % 10)
        s = s // 10 + s % 10
    print(ans + s)

t = int(input())
for _ in range(t):
	s = int(input())

	ans = 0
	while s >= 10:
		to_spend = (s // 10) * 10
		ans += to_spend
		s -= to_spend
		s += to_spend // 10

	ans += s
	print(ans)


for i in range(int(input())):
	n = int(input())
	ans = 0
	while(n!=0):
		k = n//10
		ans += k*10
		n -= (k*10)
		n += k
		if(k==0):
			ans+=n
			break
	print(ans)

from sys import stdin
input = stdin.readline

def getAns(s):
    if s < 10:
        return s
    else:
        return s + (s - 10)//9 + 1

t = int(input())
for _ in range(t):
    s = int(input())
    print(getAns(s))


#10-11, 19-21, 28-31, 


import sys
import math
import bisect
import itertools
import random
import re

def solve(n):
    ans = 0
    while n:
        if n < 10:
            ans += n
            n = 0
        else:
            ans += n // 10 * 10
            n = n // 10 + n % 10
    return ans

def main():
    for _ in range(int(input())):
        n = int(input())
        print(solve(n))

def __starting_point():
    main()

__starting_point()

for _ in range(int(input())):
    
    n = int(input())
    
    c = 0
    while(n>=10):
        c += n - n%10
        n = n%10 + n//10
    c += n
    
    print(c)