#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  int last_buy = -1;
  int money = 1000;
  if (a[0] < a[1]) {
    money = (1000 / a[0]) * (a[1] - a[0]) + 1000;
    last_buy = 0;
  }
  for (int i = 2; i < n; ++i) {
    if (a[i] > a[i - 1]) {
      money += (money / a[i - 1]) * (a[i] - a[i - 1]);
    }
  }
  cout << money << endl;
}
