#include <bits/stdc++.h>
using namespace std;
void solve() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  int curr = 1000;
  int stocks = 0;
  for (int i = 1; i <= n - 1; i++) {
    if (a[i + 1] > a[i]) {
      stocks += (curr / a[i]);
      curr -= ((curr / a[i]) * a[i]);
    } else {
      curr += (stocks * a[i]);
      stocks = 0;
    }
  }
  if (stocks > 0) curr += (stocks * a[n]);
  cout << curr;
  return 0;
}
