#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  bool buy = false;
  int money = 1000;
  int kabu = 0;
  int cnt = 0;
  int finb = 0;
  for (ll i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      buy = true;
      kabu += money / a[i - 1];
      money %= a[i - 1];
      finb = kabu * a[i - 1];
    } else if (a[i] < a[i - 1]) {
      buy = false;
      money += kabu * a[i - 1];
      kabu = 0;
    }
  }
  if (buy) money += kabu * a[n - 1];
  cout << money << endl;
  return 0;
}
