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