#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int buy = 1000000000000000001;
  ;
  long long int sell = -1;
  long long int amt = 1000;
  long long int qty;
  long long int cnt = 0;
  for (long long int i = 0; i < n; i++) {
    while (arr[i] < buy and i != n - 1) {
      buy = arr[i];
      i++;
    }
    qty = amt / buy;
    cout << qty * buy << "\n";
    amt -= qty * buy;
    while (arr[i] > sell and i != n) {
      sell = arr[i];
      i++;
    }
    amt += qty * sell;
    buy = 1000000000000000001;
    ;
    sell = -1;
  }
  cout << amt;
  return 0;
}
