#include <bits/stdc++.h>
using namespace std;
int N;
vector<int64_t> A;
int INIT = 1000;
int64_t MONEY;
int64_t KABU;
int main() {
  cin >> N;
  A = vector<int64_t>(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  MONEY = INIT;
  KABU = 0;
  for (int i = 0; i < N; i++) {
    if (i == N - 1) {
      MONEY += A[i] * KABU;
      KABU = 0;
      cout << MONEY << endl;
      return 0;
    }
    if (A[i] < A[i + 1]) {
      double tmp = MONEY / A[i];
      KABU += (int)tmp;
      MONEY -= A[i] * (int)tmp;
      continue;
    }
    if (A[i] > A[i + 1]) {
      MONEY += A[i] * KABU;
      KABU = 0;
      continue;
    }
  }
}
