#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  ll n;
  cin >> n;
  ll ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  ll amt = 1000;
  ll stock = 1000 / ar[0];
  amt = amt - (ar[0] * stock);
  ll cp = ar[0], sp = 0;
  for (int i = 1; i < n; i++) {
    if (ar[i] > ar[i - 1]) {
      amt += (stock * ar[i]);
      sp = ar[i];
      stock = 0;
    } else if (ar[i] < cp && amt >= ar[i]) {
      ll no_units = floor(amt / ar[i]);
      stock += no_units;
      amt = amt - (no_units * ar[i]);
      cp = ar[i];
    }
  }
  if (stock > 0) {
    amt += (stock * cp);
  }
  cout << amt << "\n";
}
