#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const long long INF = 9e15;
const double PI = 3.14159265358979323846;
using ll = long long;
using P = pair<long long, long long>;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vP = vector<pair<long long, long long>>;
long long gcd(long long m, long long n) {
  long long a = max((ll)m, (ll)n);
  long long b = min((ll)m, (ll)n);
  long long r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
long long lcd(long long m, long long n) { return m * n / gcd(m, n); }
long long power(long long x, long long N) {
  long long ret = 1;
  for (long long i = 0; i < N; i++) ret *= x;
  return ret;
}
long long repeat_squaring(long long x, long long n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0) {
    long long t = repeat_squaring(x, n / 2);
    return t * t % mod;
  } else
    return x * repeat_squaring(x, n - 1);
}
map<long long, long long> factor(long long p) {
  ll p1 = p;
  map<long long, long long> ret;
  for (long long i = 2; i * i <= p1; i++) {
    while (p % i == 0) {
      ret[i]++;
      p /= i;
    }
  }
  if (p != 1) ret[p]++;
  return ret;
}
bool is_prime(long long N) {
  for (long long i = 2; i * i <= N; i++) {
    if (N % i == 0) return false;
  }
  return true;
}
void chmax(long long &a, long long b) { a = max((ll)a, (ll)b); }
void chmin(long long &a, long long b) { a = min((ll)a, (ll)b); }
struct UnionFind {
  vector<long long> par;
  vector<long long> s;
  UnionFind(long long N) : par(N), s(N) {
    for (long long i = 0; i < N; i++) {
      par[i] = i;
      s[i] = 1;
    }
  }
  long long root(long long i) {
    if (par[i] == i) return i;
    par[i] = root(par[i]);
    return root(par[i]);
  }
  long long size(long long i) { return s[root(i)]; }
  bool same(long long x, long long y) { return root(x) == root(y); }
  void unite(long long x, long long y) {
    if (!same(x, y)) {
      long long rx = root(x);
      long long ry = root(y);
      par[rx] = par[ry];
      s[ry] = s[rx] + s[ry];
    }
  }
};
int m = 1000;
int stock = 0;
void buy(int p) {
  stock += m / p;
  m %= p;
}
void sell(int p) {
  m += p * stock;
  stock = 0;
}
int main() {
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  vector<int> a(N);
  for (long long i = 0; i < N; i++) cin >> a[i];
  set<int> s;
  int rizing = 2;
  for (long long i = 0; i < N; i++) {
    if (rizing == 2) {
      if (a[i] < a[i + 1]) {
        buy(a[0]);
        rizing = 1;
      } else if (a[i] > a[i + 1]) {
        rizing = 0;
      } else
        continue;
    } else if (i == N - 1) {
      if (rizing) sell(a[i]);
    } else {
      if (rizing) {
        if (a[i] > a[i + 1]) {
          sell(a[i]);
          rizing = 0;
        }
      } else {
        if (a[i] < a[i + 1]) {
          buy(a[i]);
          rizing = 1;
        }
      }
    }
    cout << m << endl;
  }
}
