#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 2);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  A[N] = 1;
  A[N + 1] = 1;
  long long money = 1000;
  long long cnt = 0;
  for (int i = 0; i < N; i++) {
    if (cnt == 0) {
      if (A[i + 1] > A[i]) {
        int laterMax = *max_element(A.begin() + i, A.end());
        if (laterMax <= A[i]) {
          continue;
        } else {
          cnt = money / A[i];
          money -= A[i] * cnt;
        }
      }
    } else {
      if (A[i + 1] < A[i]) {
        money += A[i] * cnt;
        cnt = 0;
      } else if (A[i + 2] >= A[i + 1]) {
        money += A[i] * cnt;
        cnt = 0;
      } else {
        continue;
      }
    }
  }
  cout << money << endl;
  return 0;
}
