#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n];
  long long int in = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  int f = 0, st = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1] && f == 0) {
      st = (in / a[i]);
      in -= (in / a[i]) * a[i];
      f = 1;
    } else if (a[i] > a[i + 1]) {
      in += st * a[i];
      st = 0;
      f = 0;
    }
  }
  if (st != 0) in += st * a[n - 1];
  cout << in << endl;
  return 0;
}
