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