#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int &x : v) cin >> x;
  long long val = 1000;
  int cur = 0;
  for (int i = 0; i < n - 1; i++) {
    if (v[i] < v[i + 1]) {
      cur = val / v[i];
      val %= v[i];
      val += cur * v[i + 1];
    }
  }
  cout << val << "\n";
  return 0;
}
