#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
const int inf = 1e9;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const long long MAX = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long money = 1000, stock = 0;
  vector<long long> stock_upper, stock_lower;
  bool want_bottom;
  for (int i = 0; i < n - 1; ++i) {
    if (a[i] < a[i + 1]) {
      want_bottom = true;
      break;
    } else if (a[i] > a[i + 1]) {
      want_bottom = false;
      break;
    }
    want_bottom = false;
  }
  long long current_price = a[0];
  for (int i = 1; i <= n - 1; ++i) {
    if (current_price < a[i]) {
      if (want_bottom) {
        stock_lower.push_back(current_price);
        want_bottom = false;
      }
    } else if (current_price > a[i]) {
      if (!want_bottom) {
        stock_upper.push_back(current_price);
        want_bottom = true;
      }
    }
    current_price = a[i];
  }
  if (!want_bottom) stock_upper.push_back(a[n - 1]);
  for (int i = 0; i < (int)stock_lower.size(); ++i) {
    stock = money / stock_lower[i];
    money -= stock * stock_lower[i];
    money += stock * stock_upper[i];
    stock = 0;
  }
  cout << money << endl;
  return 0;
}
