#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;
  int stock = 0, money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      stock += money / a[i];
      money -= money / a[i] * a[i];
    } else if (a[i] > a[i + 1]) {
      money += stock * a[i];
      stock = 0;
    } else
      continue;
  }
  if (stock != 0) {
    money += stock * a[n - 1];
    stock = 0;
  }
  cout << money << endl;
  return 0;
}
