#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
const ll INF = 1000000000000000000;
const ll mod = 1000000007;
const ld pi = 3.141592653589793238;
ll test[12345678];
signed main() {
  string s, t;
  ll n, m, k, a = 1000, cnt = INF;
  cin >> n;
  for (ll i = 0; i < n; i++) {
    cin >> test[i];
    if (cnt >= test[i]) {
      cnt = test[i];
    } else {
      ll kabu = a / cnt;
      a %= cnt;
      a += kabu * test[i];
      cnt = INF;
    }
  }
  cout << a << endl;
  return 0;
}
