#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int kabusuu = 0;
  int genkin = 1000;
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] < a[i + 1]) {
      kabusuu = kabusuu + genkin / a[i];
      genkin = genkin - kabusuu * a[i];
    } else if (a[i] > a[i + 1]) {
      genkin = genkin + kabusuu * a[i];
      kabusuu = 0;
    }
  }
  genkin = genkin + kabusuu * a[n];
  kabusuu = 0;
  cout << genkin << endl;
  return 0;
}
