#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 f[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      f[i] = 1;
    } else {
      f[i] = -1;
    }
  }
  long long m = 1000;
  int stk = 0;
  for (long long i = 0; i < n; i++) {
    if (i != n - 1) {
      if (f[i] == 1) {
        stk += m / a[i];
        m -= m / a[i] * a[i];
      } else if (f[i] == -1) {
        m += stk * a[i];
        stk = 0;
      }
    } else {
      m += stk * a[i];
      stk = 0;
    }
  }
  cout << m << "\n";
}
