#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
int N;
int A[100];
int u[100], d[100];
int main(void) {
  cin >> N;
  for (int i = 0; i < (N); i++) cin >> A[i];
  for (int i = 1; i < N; i++) {
    if (A[i] > A[i - 1]) u[i - 1] = 1;
    if (A[i] < A[i - 1]) d[i - 1] = 1;
  }
  int c = 1000;
  int kabu = 0;
  for (int i = 0; i < N; i++) {
    if (u[i] == 1) {
      kabu = c / A[i];
      c = c % A[i];
    }
    if (d[i] == 1) {
      c += A[i] * kabu;
      kabu = 0;
    }
  }
  c += A[N - 1] * kabu;
  cout << c << endl;
  return 0;
}
