#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  int k = 0;
  int s = 1000;
  for (int j = 0; j < N - 1; j++) {
    if (A[j] < A[j + 1] || (A[j] == A[j + 1] && A[j + 1] < A[j + 2])) {
      k += s / A[j];
      s -= (s / A[j]) * A[j];
    } else if (A[j] > A[j + 1]) {
      s += k * A[j];
      k = 0;
    }
  }
  cout << s + k * A[N - 1] << endl;
}
