#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int kabu = 0;
  int money = 1000;
  bool upflg = false;
  bool dnflg = true;
  for (int i = 0; i < (n); ++i) {
    if (i == n - 1) {
      if (kabu != 0) {
        money += kabu * a[i];
      }
    } else {
      if (dnflg && a[i] < a[i + 1]) {
        kabu = money / a[i];
        money = money % a[i];
        dnflg = false;
        upflg = true;
      }
      if (upflg && a[i] > a[i + 1]) {
        money += kabu * a[i];
        kabu = 0;
        dnflg = true;
        upflg = false;
      }
    }
  }
  cout << money << endl;
  return 0;
}
