#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int a[n];
  for (auto &x : a) {
    cin >> x;
  }
  int money = 1000;
  int have = 0;
  for (int i = 0; i < n - 1; i++) {
    if (have == 0 && a[i] < a[i + 1]) {
      have = money / a[i];
      money -= have * a[i];
    } else if (have > 0 && a[i] > a[i + 1]) {
      money += have * a[i];
      have = 0;
    }
  }
  money += a[n - 1] * have;
  cout << money << endl;
  return 0;
}
