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