#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 2);
  vector<int> grad(N + 1);
  A[N + 1] = 0;
  for (int i = 1; i <= N; i++) {
    cin >> A[i];
  }
  for (int i = 1; i <= N; i++) {
    grad[i] = A[i + 1] - A[i];
  }
  bool have_kabu = false;
  int K_num = 0;
  int money = 1000;
  for (int i = 1; i <= N; i++) {
    if (have_kabu == false) {
      if (grad[i] > 0) {
        K_num += money / A[i];
        money = money % A[i];
        have_kabu = true;
      }
    } else if (grad[i] < 0) {
      money = money + K_num * A[i];
      K_num = 0;
      have_kabu = false;
    }
  }
  cout << money << endl;
  return 0;
}
