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