#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 1000;
  int kabu = 0;
  int N;
  cin >> N;
  int A[N + 1];
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  A[N] = 0;
  int minA = A[0];
  for (int i = 1; i < N; i++) {
    if (minA > A[i]) {
      minA = A[i];
    } else if (minA < A[i]) {
      int maxA = A[i];
      int j = i;
      while (j < N && maxA <= A[j]) {
        maxA = A[j];
        j++;
      }
      i = j;
      int cnt = ans / minA;
      ans -= minA * cnt;
      ans += cnt * maxA;
      minA = A[i];
    }
  }
  cout << ans << endl;
  return 0;
}
