#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
int main() {
  int N;
  cin >> N;
  int a[N];
  for (int i = 0; i < N; i++) cin >> a[i];
  bool upflag = false;
  bool downflag = false;
  int money = 1000;
  int stock = 0;
  vector<int> act;
  if (a[1] - a[0] > 0) upflag = true;
  if (a[1] - a[0] < 0) downflag = true;
  if (upflag) {
    stock += money / a[0];
    money -= stock * a[0];
  }
  for (int i = 0; i < N - 1; i++) {
    if (a[i + 1] - a[i] > 0) {
      if (downflag) {
        stock += money / a[i];
        money -= stock * a[i];
      }
      upflag = true;
      downflag = false;
    }
    if (a[i + 1] - a[i] < 0) {
      if (upflag) {
        money += stock * a[i];
        stock = 0;
      }
      upflag = false;
      downflag = true;
    }
  }
  if (upflag) {
    money += stock * a[N - 1];
    stock = 0;
  }
  cout << money << endl;
}
