#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
int main() {
  int n;
  int money = 1000;
  int stock = 0;
  cin >> n;
  vi a(n);
  for (int(i) = (0); (i) < (n); (i)++) cin >> a[i];
  bool f1 = false;
  for (int(i) = (0); (i) < (n - 1); (i)++) {
    if (a[i] < a[i + 1]) {
      f1 = true;
      if (stock == 0) {
        stock += (money / a[i]);
        money -= stock * a[i];
      }
    } else {
      if (f1 == true) {
        money += stock * a[i];
        stock = 0;
        f1 = false;
      }
    }
  }
  if (stock > 0) {
    money += stock * a[n - 1];
  }
  cout << money << endl;
  return 0;
}
