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