#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long mod = 1e9 + 7;
const long long mod1 = 998244353;
const long long big = 1e18;
const double PI = 2 * asin(1);
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; ++i) cin >> A[i];
  int ans = 1000;
  bool up;
  int index = -1;
  for (int i = 0; i < N - 1; ++i) {
    if (A[i] != A[i + 1]) {
      index = i;
      break;
    }
  }
  if (index == -1) {
    cout << 1000 << endl;
    return 0;
  }
  int kabu = 0;
  if (A[index] < A[index + 1]) {
    up = true;
    kabu = ans / A[index];
    ans -= A[index] * kabu;
  } else
    up = false;
  for (int i = index; i < N - 1; ++i) {
    if (up) {
      if (A[i] > A[i + 1]) {
        ans += kabu * A[i];
        kabu = 0;
        up = false;
      }
    } else {
      if (A[i] < A[i + 1]) {
        kabu = ans / A[i];
        ans -= A[i] * kabu;
        up = true;
      }
    }
  }
  ans += kabu * A[N - 1];
  cout << ans << endl;
}
