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