#include <bits/stdc++.h>
using namespace std;
unordered_map<long, long> mp;
unordered_map<long, long> mp2;
int main() {
  int N;
  int A[100];
  int B[100];
  int kane = 1000;
  int kabu = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < N - 1; i++) {
    kabu = 0;
    if (A[i] < A[i + 1]) {
      kabu = kane / A[i];
    }
    kane += kabu * (A[i + 1] - A[i]);
  }
  cout << kane << "\n";
  return 0;
}
