#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long> A(81, 0);
  long long ans = 1000;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  A[N] = 0;
  long long count = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] >= A[i + 1]) {
      if (count) {
        ans += A[i] * count;
        count = 0;
      }
    } else {
      count = ans / A[i];
      ans -= count * A[i];
    }
    cout << ans << endl;
  }
  cout << ans << endl;
}
