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