#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N + 2];
  for (int i = 1; i <= (N); ++i) cin >> A[i];
  A[0] = 300;
  A[N + 1] = 0;
  int B[N + 1];
  long long m = 1000;
  long long st = 0;
  for (int i = 1; i <= (N); ++i) {
    if ((A[i + 1] >= A[i]) && (A[i] < A[i - 1])) {
      B[i] = -1;
    } else if ((A[i + 1] <= A[i]) && (A[i] > A[i - 1])) {
      B[i] = 1;
    } else {
      B[i] = 0;
    }
  }
  for (int i = 1; i <= (N); ++i) {
    if (B[i] == -1) {
      st += m / A[i];
      m -= A[i] * st;
    } else if (B[i] == 1) {
      m += A[i] * st;
      st = 0;
    }
  }
  cout << m << endl;
  return 0;
}
