#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = 1; i <= N; ++i) {
    cin >> A[i];
  }
  vector<int> port(N + 1);
  int value = 1000;
  for (int i = 1; i <= N - 1; ++i) {
    if (A[i + 1] - A[i] > 0) {
      port[i] = value / A[i];
    } else {
      port[i] = 0;
    }
    value += port[i] * (A[i + 1] - A[i]);
  }
  cout << value << endl;
  return 0;
}
