#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1000000007;
const double PI = acos(-1);
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  ll money = 1000;
  ll stock = 0;
  for (ll i = 0; i < n; i++) {
    money += a[i] * stock;
    stock = 0;
    if (i != n - 1) {
      if (a[i] < a[i + 1]) {
        while (0 <= money - a[i]) {
          money -= a[i];
          stock++;
        }
      }
    }
  }
  cout << money << endl;
}
