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