#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long mod = 1e9 + 7;
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];
  bool kai;
  int money = 1000, kabu = 0;
  if (A[0] >= A[1]) {
    kai = false;
  } else {
    kai = true;
    kabu = money / A[0];
    money %= A[0];
  }
  for (int i = 1; i < N; ++i) {
    if (kai) {
      if (A[i] > A[i + 1]) {
        money += kabu * A[i];
        kabu = 0;
        kai = false;
      }
    } else {
      if (A[i] < A[i + 1]) {
        kai = true;
        kabu = money / A[i];
        money %= A[i];
      }
    }
  }
  if (kabu > 0) money += kabu * A[N - 1];
  cout << money << endl;
}
