#include <algorithm>
#include <cstdio>

using namespace std;

typedef pair<int,int> par;

int n;
int jumps[11];
int gcd( int a, int b ) { return b == 0 ? a : gcd( b, a%b ); }

par intersect( par a, par b ) {
    int lcm = a.first*b.first / gcd(a.first, b.first);
    int k = min( a.first*a.second, b.first*b.second ) / lcm;
    return par( lcm, k );
}

int fui( par p, int d ) {
    if( d == 0 ) return p.second;
    return fui( p, d-1 ) - fui( intersect(p,par(d,jumps[d])), d-1 );
}

int main( void ) {
    scanf( "%d", &n );
    for( int d = 1; d <= n; ++d ) {
        int k;
        scanf( "%d", &k );

        int lo = k, hi = 2000000000/d;
        while( lo != hi ) {
            int mid = (lo+hi)/2;
            if( fui( par(d, mid), d-1 ) < k ) lo = mid+1; else hi = mid;
        }

        printf( "%d\n", (jumps[d] = lo)*d );
    }
    return 0;
}
