#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x, maxi = 0, money = 1000, stock = 0, idx = 0, price = 0, i, j;
  cin >> n;
  vector<int> vect;
  for (i = 0; i < n; i++) {
    cin >> x;
    vect.push_back(x);
    if (x > maxi) {
      maxi = x;
      idx = i;
    }
  }
  for (i = 0; i < n; i++) {
    int temp = 0;
    if (vect[i] > price && stock > 0) {
      money = money + (vect[i] * stock);
      stock = 0;
    } else if (maxi > vect[i]) {
      for (j = i + 1; j < idx; j++) {
        if (vect[j] < vect[i] && money >= vect[j]) {
          temp = 1;
          price = vect[j];
          stock = stock + (money / vect[j]);
          money = money - (vect[j] * stock);
          i = j;
          break;
        }
      }
      if (temp == 0 && money >= vect[i] && i < idx) {
        price = vect[i];
        stock = stock + (money / vect[i]);
        money = money - (vect[i] * stock);
      }
    } else if (stock > 0 && price < vect[i]) {
      money = money + (vect[i] * stock);
      stock = 0;
    }
  }
  cout << money << "\n";
}
