#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& e : a) cin >> e;
  int curr = 1000;
  for (int i = 0; i + 1 < n; i++) {
    int s = 0;
    if (a[i] < a[i + 1]) s = curr / a[i];
    curr += (a[i + 1] - a[i]) * s;
  }
  cout << curr << '\n';
  return 0;
}
