#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int t = (10 * n) / 9;
    if (t % 10 == 0)
      cout << t - 1 << endl;
    else {
      cout << t << endl;
    }
  }
}
