#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int i, j;
  int money = 1000;
  int kb = 0;
  int l = 0;
  bool f = true;
  for (i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  i = 0;
  j = 1;
  while (j != n) {
    if (f == true && a.at(i) >= a.at(j)) {
      i++;
      j++;
    } else if (f == true && a.at(i) < a.at(j)) {
      f = false;
      l = a.at(i);
      kb = money / a.at(i);
      money = money - (kb * a.at(i));
      i++;
      j++;
    } else if (f == false && a.at(i) <= a.at(j)) {
      i++;
      j++;
    } else if (f == false && a.at(i) > a.at(j)) {
      f = true;
      money = money + (kb * a.at(i));
      kb = 0;
      i++;
      j++;
    }
  }
  cout << money << endl;
}
