#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 2147483647;
const ll MOD = 1000000007;
int main() {
  ll n;
  cin >> n;
  ll money = 1000;
  ll h = 0;
  vector<ll> a(n);
  for (int i = 0; i < int(n); ++i) cin >> a[i];
  int last = -1;
  int last_m = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (last_m > a[i] && a[i] < a[i + 1])
      last = i;
    else
      break;
  }
  for (int i = 0; i < int(n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      if (i > last)
        ;
      else {
        h += money / a[i];
        money %= a[i];
      }
    }
    if (a[i] > a[i + 1]) {
      money += h * a[i];
      h = 0;
    }
  }
  money += h * a[n - 1];
  cout << money << endl;
  return 0;
}
