#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  int money = 1000;
  int p = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      if (a.at(i) < a.at(i + 1)) {
        p += money / a.at(i);
        money -= a.at(i) * p;
      }
    } else if (i == n - 1) {
      money += p * a.at(i);
    } else {
      if (a.at(i - 1) <= a.at(i) && a.at(i) > a.at(i + 1)) {
        money += p * a.at(i);
        p = 0;
      }
      if (a.at(i - 1) >= a.at(i) && a.at(i) < a.at(i + 1)) {
        p += money / a.at(i);
        if (money / a.at(i) > 0) money -= a.at(i) * p;
      }
    }
  }
  cout << money << endl;
}
