#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 money = 1000;
  long long stock = 0;
  long long ans = money;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      stock = money / a[i];
      money -= stock * a[i];
    } else {
      if (a[i] > a[i - 1]) {
        money += stock * a[i];
        stock = 0;
      } else if (a[i] < a[i - 1]) {
        stock += money / a[i];
        money -= stock * a[i];
      }
    }
    ans = max(ans, money);
  }
  cout << ans << endl;
  return 0;
}
