#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int N;
  cin >> N;
  vector<int> stocks(N);
  vector<int> action(N);
  for (int i = 0; i < (N); ++i) {
    cin >> stocks[i];
  }
  bool up = false;
  for (int i = 0; i < (N - 1); ++i) {
    if (stocks[i] < stocks[i + 1]) {
      if (!up) {
        action[i] = 1;
      }
      up = true;
    } else {
      if (up) {
        action[i] = 2;
      }
      up = false;
    }
  }
  action[N - 1] = 2;
  int money = 1000;
  int stk = 0;
  for (int i = 0; i < (N); ++i) {
    if (action[i] == 1) {
      stk = money / stocks[i];
      money = money % stocks[i];
    }
    if (action[i] == 2) {
      money = stk * stocks[i] + money;
      stk = 0;
    }
  }
  cout << money << endl;
}
