#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  int total = 1000;
  int prev = a[0];
  for (int i = 0; i < (n); ++i) {
    cout << total << endl;
    if (prev < a[i]) {
      total = total / prev * a[i] + total % prev;
      prev = a[i];
    } else {
      prev = min(prev, a[i]);
    }
  }
  cout << total << endl;
}
