#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int INF = 1e9;
const lint LINF = 1e18;
const lint MOD = 1e9 + 7;
const double EPS = 1e-10;
const int M = 20;
int main() {
  int N;
  cin >> N;
  vector<lint> A(N, 0);
  for (int i = (int)(0); i < (int)(N); i++) cin >> A[i];
  A.push_back(-1);
  lint sum = 1000;
  lint k = 0;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (A[j] >= A[i] and A[j] > A[j + 1]) {
        k = sum / A[i];
        sum -= A[i] * k;
        sum += k * A[j];
        k = 0;
        i = j;
        break;
      }
    }
  }
  cout << sum << endl;
  return 0;
}
