#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n;
  cin >> n;
  int a[n];
  int c = 1000;
  int k = 0;
  int d;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      d = c / a[i];
      c = c - d * a[i];
      k = k + d;
    } else if (a[i] > a[i + 1]) {
      c = c + k * a[i];
      k = 0;
    }
  }
  c = c + k * a[n - 1];
  cout << c << endl;
  return 0;
}
