#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, stock = 0, money = 1000;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a.at(i);
  }
  for (int i = 0; i < n - 1; ++i) {
    if (a.at(i) < a.at(i + 1)) {
      stock = money / a.at(i);
      money %= a.at(i);
      cout << money << endl;
    } else if (a.at(i) > a.at(i + 1)) {
      money += stock * a.at(i);
      stock = 0;
      cout << money << endl;
    }
    if (i == n - 2) money += stock * max(a.at(i), a.at(i + 1));
  }
  cout << money << endl;
  return 0;
}
