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