#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  A[N] = 0;
  long long money = 1000;
  long long stock = 0;
  for (int i = 0; i < N; ++i) {
    if (A[i] < A[i + 1]) {
      stock = money / A[i];
      money = money - (A[i] * stock);
    } else {
      money = money + (stock * A[i]);
      stock = 0;
    }
  }
  cout << money << "\n";
}
