#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[100];
  A[N] = 0;
  for (int i = 0; i < N; i++) cin >> A[i];
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] < A[i + 1] && kabu == 0) {
      kabu = money / A[i];
      money -= kabu * A[i];
    }
    if (A[i] > A[i + 1] && kabu != 0) {
      money += kabu * A[i];
      kabu = 0;
    }
  }
  cout << money << endl;
}
