#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using V = vector<int>;
using VV = vector<V>;
using VVV = vector<VV>;
using VL = vector<ll>;
using VVL = vector<VL>;
using VVVL = vector<VVL>;
template <class T>
using VE = vector<T>;
template <class T>
using P = pair<T, T>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const ll MOD = 1e9 + 7;
ll upper = MOD + MOD;
ll under = -upper;
ll UPPER = MOD * MOD;
ll UNDER = -UPPER;
const long double pi = 3.141592653589793;
int main() {
  int n;
  cin >> n;
  VL a(n);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  VL dp(n, 1000);
  for (int i = 0; i < (n); i++) {
    for (int j = (i + 1); j < (n); j++) {
      chmax(dp[j], dp[i]);
      ll x = dp[i] / a[i];
      ll rem = dp[i] % a[i];
      chmax(dp[j], x * a[j] + rem);
    }
    for (int j = (i + 1); j < (n); j++) chmax(dp[j], dp[i]);
  }
  for (int i = 0; i < (n); i++) cout << dp[i] << endl;
  return 0;
}
