#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int maxn = 100000;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
bool sortinrevsec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
int main() {
  int n, i, x = -1, y = -1, sum = 1000, s;
  cin >> n;
  long long int a[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (i == 1) {
      x = a[i];
      y = a[i];
      continue;
      s = 1000 / a[i];
      sum = sum - s * a[i];
      x = a[i];
    }
    if (a[i] > x) {
      y = x;
      x = a[i];
      s = sum / y;
      sum = sum - s * y;
      sum = sum + s * x;
    }
    cout << sum;
  }
  return 0;
}
