#include <bits/stdc++.h>
using namespace std;
int a[200005];
int main() {
  int n, sum = 1000, num = 0, maxn, minn;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  maxn = a[1];
  minn = a[1];
  for (int i = 2; i <= n + 1; ++i) {
    maxn = max(maxn, a[i]);
    minn = min(minn, a[i]);
    if (a[i] > a[i - 1]) {
      num = sum / minn;
      sum = sum - num * minn;
      minn = a[i];
    }
    if (a[i] < a[i - 1]) {
      sum = sum + num * maxn;
      num = 0;
      maxn = a[i];
    }
  }
  cout << sum << endl;
}
