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