#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, a, b, c;
  cin >> t;
  for (i = 1; i <= t; i++) {
    cin >> a;
    b = (int)a / 9;
    c = b + a;
    if (c % 10 == 0) {
      cout << c - 1 << endl;
    } else {
      cout << c << endl;
    }
  }
}
