#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long n, a, have = 0, c = 1000, prev;
  cin >> n >> prev;
  for (int i = (int)(1), sz = (int)(n); i < sz; i++) {
    cin >> a;
    if (a > prev) {
      have = c / prev, c %= prev;
      c += have * a;
      printf("%d\n", c);
    }
    prev = a;
  }
  printf("%lld\n", c);
  return 0;
}
