#The solution in Python 3 is as follows:
t=int(input())
i=0
while i<t:
k=int(input())
if k==1:
print(192)
else:
print(192+((k-1)*250))
i+=1
#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!
t=int(input())
i=0
while i<t:
k=int(input())
if k==1:
print(192)
else:
print(192+((k-1)*250))
i+=1
#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!