#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<int> vec;
  vec.push_back(a[0]);
  for (int i = 1; i < n; ++i) {
    if (vec.back() == a[i]) continue;
    vec.push_back(a[i]);
  }
  int total = 1000, cnt = 0;
  for (int i = 0; i + 1 < vec.size(); ++i) {
    if (vec[i] < vec[i + 1]) {
      cnt = total / vec[i];
      total -= vec[i] * cnt;
      total += vec[i + 1] * cnt;
      cnt = 0;
    }
  }
  cout << total << endl;
  return 0;
}
