#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> V(N);
  for (int i = 0; i < N; i++) {
    cin >> V.at(i);
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N; i++) {
    if (i == N - 1 && kabu > 0) {
      money += kabu * V.at(i);
      kabu = 0;
      break;
    }
    if (i == N - 1 && kabu == 0) {
      break;
    }
    if (V.at(i) < V.at(i + 1)) {
      kabu += money / V.at(i);
      money = money - V.at(i) * (money / V.at(i));
    }
    if (V.at(i) > V.at(i + 1) && kabu > 0) {
      money += kabu * V.at(i);
      kabu = 0;
    }
    if (V.at(i) == V.at(i + 1) || kabu == 0) {
      continue;
    }
  }
  cout << money << endl;
}
