#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long s, t, x;
};
const long long MAX = 510000;
const long long MOD = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  long long money = 1000ll;
  long long num = 0ll;
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> A[i];
  }
  int memo[N];
  if (A[0] > A[1]) {
    memo[0] = 1;
  }
  if (A[0] == A[1]) {
    memo[0] = 0;
  }
  if (A[0] < A[1]) {
    memo[0] = -1;
  }
  for (int i = 1; i < N - 1; i++) {
    if (A[i] >= A[i + 1] && A[i + 1] < A[i + 2]) {
      memo[i] = -1;
    } else if (A[i] <= A[i + 1] && A[i + 1] > A[i + 2]) {
      memo[i] = 1;
    } else {
      memo[i] = 0;
    }
  }
  memo[N - 1] = 1;
  for (long long i = 0; i < (long long)(N); i++) {
    if (memo[i] == -1) {
      long long p = money / A[i];
      money -= p * A[i];
      num += p;
    }
    if (memo[i] == 1) {
      money += num * A[i];
      num = 0ll;
    }
  }
  cout << money;
}
