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