#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    B.at(i) = 0;
    if (!(i == 0)) {
      if (A.at(i - 1) < A.at(i))
        B.at(i - 1) = 1;
      else if (A.at(i - 1) > A.at(i))
        B.at(i - 1) = 2;
    }
  }
  int G = 1000;
  int K = 0;
  for (int i = 0; i < N - 1; i++) {
    if (B.at(i) == 1) {
      K += G / A.at(i);
      G = G % A.at(i);
    } else if (B.at(i) == 2) {
      G += K * A.at(i);
      K = 0;
    }
  }
  G += K * A.at(N - 1);
  cout << G << endl;
}
