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