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