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