#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  vector<int> A;
  long long money = 1000;
  long long stock = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  for (int i = 0; i < N; i++) {
    if (i == N - 1) {
      money += stock * A.at(i);
      stock = 0;
    } else {
      if (A.at(i) < A.at(i + 1)) {
        stock += int(money / A.at(i));
        money = money % A.at(i);
      } else if (A.at(i) > A.at(i + 1)) {
        money += stock * A.at(i);
        stock = 0;
      }
    }
  }
  cout << money << endl;
}
