#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[100];
  long long start = 1000;
  long long div = 0;
  long long kabu = 0;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      kabu = start / a[i];
      div = start % a[i];
      start = kabu * a[i + 1];
    }
  }
  cout << start + div << endl;
  return 0;
}
