#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long x = 1000, kabu = 0;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int mi = a[0], ma = a[0];
  for (int i = 1; i < n; i++) {
    mi = min(mi, a[i]);
    if (a[i] > ma) {
      ma = a[i];
      kabu += x / mi;
      x %= mi;
      x += kabu * ma;
      kabu = 0;
      mi = a[i];
    }
  }
  cout << x << endl;
  return 0;
}
