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