#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, S;
  cin >> N;
  long long int M = 1000;
  vector<long int> A(87);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  for (int i = 0; i < N; i++) {
    if (M >= 1000) {
      if (A.at(i) < A.at(i + 1)) {
        S = M / A.at(i);
        M %= A.at(i);
      }
    } else {
      if (A.at(i) < A.at(i + 1))
        continue;
      else {
        M += S * A.at(i);
        S = 0;
      }
    }
  }
  cout << M << endl;
}
