#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, i, stock;
  long long funds;
  funds = 1000;
  stock = 0;
  cin >> N;
  int A[N];
  for (i = 0; i < N; i++) cin >> A[i];
  for (i = 0; i < N; i++) {
    if (A[i] < A[i + 1] && i != N - 1) {
      while (funds - A[i] >= 0) {
        funds -= A[i];
        stock++;
      }
    } else {
      funds += stock * A[i];
      stock = 0;
    }
  }
  cout << funds << endl;
}
