#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  vector<int> mn(n), mx(n);
  int tmp_mn = INF, tmp_mx = 0;
  for (ll i = 0; i < n; i++) {
    tmp_mn = min(tmp_mn, a[i]);
    mn[i] = tmp_mn;
    tmp_mx = 0;
    for (ll j = i + 1; j < n; j++) {
      tmp_mx = max(tmp_mx, a[j]);
    }
    mx[i] = tmp_mx;
  }
  int ans = 1000;
  int tmp = a[0];
  for (ll i = 1; i < n; i++) {
    if (a[i] <= tmp)
      tmp = a[i];
    else {
      ans = ans % tmp + (ans / tmp) * a[i];
      tmp = a[i];
    }
  }
  cout << ans << endl;
  return 0;
}
