#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  int temp, flag;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int cash = 1000;
  int share = 0;
  temp = a[0];
  flag = 0;
  for (int i = 1; i < n - 1; i++) {
    if (flag == 0 && a[i] < a[i - 1]) {
      temp = a[i];
      continue;
    } else if (flag == 0 && a[i] > a[i - 1]) {
      flag = 1;
      continue;
    }
    if (flag == 1 && a[i] < a[i - 1]) {
      share += (cash / temp);
      cash -= (temp * share);
      cash += (share * a[i - 1]);
      share = 0;
      temp = a[i];
    }
  }
  if (a[n - 1] >= a[n - 2]) {
    share += (cash / temp);
    cash -= (temp * share);
    cash += (share * a[n - 1]);
  } else {
    cash += (share * a[n - 2]);
  }
  cout << cash << endl;
  return 0;
}
