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