#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const long long MOD = 1000000007;
const long long INF = 1e10;
const long long MAX_N = 1010;
long long dx[4] = {0, 0, -1, 1};
long long dy[4] = {-1, 1, 0, 0};
char c[310][310];
long long dp[101];
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long kabu = 0;
  long long money = 1000;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  bool flag = false;
  long long high = 0;
  for (long long i = 0; i < n - 1; ++i) {
    if (a[i] < a[i + 1]) {
      if (flag == false) {
        kabu += money / a[i];
        money -= kabu * a[i];
      }
      flag = true;
    } else if (a[i] > a[i + 1]) {
      if (flag) {
        money += kabu * a[i];
        high = max(money, high);
        kabu = 0;
      }
      flag = false;
    }
  }
  if (a[n - 2] < a[n - 1]) {
    money += a[n - 1] * kabu;
    high = max(high, money);
  }
  if (flag)
    cout << high << endl;
  else {
    cout << 1000 << endl;
  }
  return 0;
}
