#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  int before = a[0];
  bool flg = false;
  for (int i = 1; i < n; i++) {
    if (flg == false && before < a[i]) {
      b[i - 1] = 1;
      flg = true;
    }
    if (flg == true && before > a[i]) {
      b[i - 1] = 2;
      flg = false;
    }
    if (i == n - 1) {
      b[i] = 2;
    }
    before = a[i];
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (b[i] == 1) {
      kabu = money / a[i];
      money = money - (kabu * a[i]);
    } else if (b[i] == 2) {
      money += (kabu * a[i]);
      kabu = 0;
    }
  }
  cout << money << endl;
}
