#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  int money = 1000;
  int kabu = 0;
  cin >> n;
  int as[80];
  for (int i = 0; i < n; i++) cin >> as[i];
  int tmp_arr[80] = {};
  int pre = -1;
  for (int i = 1; i < n; i++) {
    if (as[i] - as[i - 1] > 0) {
      if (pre < 0) {
        tmp_arr[i - 1] = 1;
        pre = 1;
      }
    } else if (as[i] - as[i - 1] < 0) {
      if (pre > 0) {
        tmp_arr[i - 1] = -1;
        pre = -1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (tmp_arr[i] > 0) {
      kabu = (money / as[i]);
      money -= kabu * as[i];
    }
    if (tmp_arr[i] < 0) {
      money += (kabu * as[i]);
      kabu = 0;
    }
  }
  money += (kabu * as[n - 1]);
  cout << money << endl;
}
