#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize "O3"
const long long MOD = (int)1e9 + 7;
const long long INF = MOD * MOD;
const double EPS = 1e-9;
const long long powll = 1LL << 1;
int main(void) {
  int n;
  cin >> n;
  int a[n];
  int maxa[n];
  int mina[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    maxa[i] = a[i];
    mina[i] = a[i];
  }
  for (long long i = 1; i < n; i++) {
    maxa[n - 1 - i] = max(maxa[n - i], a[n - 1 - i]);
    mina[n - 1 - i] = min(mina[n - i], a[n - 1 - i]);
  }
  int m = 1000;
  int stk = 0;
  int price = -1;
  for (long long i = 0; i < n; i++) {
    if (maxa[i] > a[i] && mina[i] == a[i]) {
      stk += m / a[i];
      m -= m / a[i] * a[i];
      price = a[i];
    }
    if (stk > 0 && a[i] > price) {
      m += stk * a[i];
      stk = 0;
    }
  }
  cout << m << "\n";
}
