#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000;
  int kabu = a[0];
  int kari = 1000 / a[0];
  int now = 1000 - kabu * kari;
  bool ok = false;
  int maxi = 100;
  int ans;
  for (int i = 1; i < n; i++) {
    if (a[i] < kabu) {
      if (ok) {
        now += kari * maxi;
        money = now;
        kabu = a[i];
        kari = money / a[i];
        now = money - kabu * kari;
        ok = false;
      } else {
        kabu = a[i];
        kari = money / a[i];
        now = money - kabu * kari;
      }
    } else if (a[i] > kabu) {
      if (ok) {
        int res = now + maxi * kari;
        int kosu = res / a[i];
        if (kosu > kari) {
          kari = kosu;
          kabu = a[i];
          now = res - kosu * a[i];
          ok = false;
          money = max(res, money);
        } else {
          ok = true;
          if (a[i] > maxi) maxi = a[i];
          if (i == n - 1) {
            money = now + kari * maxi;
          }
        }
      } else {
        ok = true;
        if (a[i] > maxi) maxi = a[i];
        if (i == n - 1) {
          money = now + kari * maxi;
        }
      }
    }
  }
  ans = max(now, money);
  cout << ans << endl;
}
