#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
static long long INF = (1LL << 62);
long long N;
vector<long long> A;
int main(int argc, char* argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  int m = 0, M = 0;
  long long A0 = INF, A1 = 0;
  for (int i = 0; i < N; i++) {
    long long a;
    cin >> a;
    A.push_back(a);
    if (a < A0) {
      A0 = a;
      m = i;
    }
    if (a > A1) {
      A1 = a;
      M = i;
    }
  }
  if (M == 0) {
    printf("1000\n");
    return 0;
  }
  long long ans = 1000;
  long long kab = 0;
  for (int i = 0; i <= M - 1; i++) {
    if (A[i] < A[i + 1] && i != M - 2) {
      long long q = ans / A[i];
      ans -= (A[i] * q);
      kab += q;
      ans += A[i + 1] * kab;
      kab = 0;
      i++;
    } else if (A[i] > A[i + 1]) {
      ans += A[i] * kab;
      kab = 0;
      long long q = ans / A[i + 1];
      ans -= (A[i + 1] * q);
      kab += q;
      i++;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
