#include <bits/stdc++.h>
using namespace std;
void func() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; ++i) cin >> a[i];
  long long stock = 0;
  long long m = a[0], ans = 1000;
  for (long long i = 1; i < n; ++i) {
    if (a[i] > m && stock == 0) {
      ans = (ans / m) * a[i] + (ans % m);
      stock = 1;
      m = a[i];
    }
    if (a[i] < m && stock == 1) {
      m = a[i];
      stock = 0;
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    func();
  }
}
