#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int main(int argc, char* argv[]) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& x : a) cin >> x;
  vector<bool> pm(n);
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] - a[i] >= 0)
      pm[i] = true;
    else
      pm[i] = false;
  }
  pm.at(n - 1) = true;
  int stock = 0, money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (pm.at(i) == true && pm.at(i + 1) != false &&
        (i == 0 || pm.at(i - 1) == false)) {
      stock += money / a[i];
      money -= money / a[i] * a[i];
    } else if (pm.at(i) == false) {
      money += stock * a[i];
      stock = 0;
    } else
      continue;
  }
  if (stock != 0) {
    money += stock * a[n - 1];
    stock = 0;
  }
  cout << money << endl;
  return 0;
}
