#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int BIG = 100000007;
int main() {
  ll n;
  cin >> n;
  ll cash = 1000;
  ll stocks = 0;
  vector<ll> a(n, 0);
  for (ll i = 0; i < n; ++i) cin >> a[i];
  for (ll i = 1; i < n; ++i) {
    if (a[i - 1] < a[i]) {
      stocks = cash / a[i - 1];
      cash -= a[i - 1] * stocks;
    } else {
      cash += stocks * a[i - 1];
      stocks = 0;
    }
  }
  cash += stocks * a[n - 1];
  cout << cash << endl;
}
