#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long rem, tmp, cur = 1000;
  for (long long i = 1; i < n; i++) {
    if (arr[i] >= arr[i - 1]) {
      tmp = cur / arr[i - 1];
      rem = cur % arr[i - 1];
      cout << tmp << endl;
      cur = (tmp * arr[i]) + rem;
    }
  }
  cout << cur;
  return 0;
}
