#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  
  vector<int> a(N);
  for (int i=0; i<N; i++) {
    cin >> a.at(i);
  }
  
  long long amount = 1000;
  for (int i=K; i<N; i++) {
     if (a.at(i-K) >= a.at(i)) {
       continue;
     }
     else if (a.at(i-K) < a.at(i)) {
       long long stock = amount / a.at(i);
       amount += stock*(a.at(i)-a.at(i-K));
     }
  }
  cout << amount << endl;
}
