#include <bits/stdc++.h>
using namespace std;
int cash = 1000, st = 0;
void sell(int amt, int price, int mn) {
  int ret = 0;
  int a = cash, b = st;
  cash -= (a / mn) * mn;
  st += (a / mn) * mn;
  st = 0;
  cash += (a / mn) * price;
}
void solve() {
  int n, minn = INT_MAX, maxn = INT_MIN;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    minn = min(minn, ar[i]);
    maxn = max(maxn, ar[i]);
  }
  int mn = maxn, mx = minn, amt = 1000;
  for (int i = 0; i < n; i++) {
    if (ar[i] < mn) {
      mn = ar[i];
    } else if (ar[i] > mx) {
      mx = ar[i];
      sell(amt, mx, mn);
      mn = mx;
    }
  }
  cout << cash + st;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
