#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<long long> vec;
  vec.push_back(a[0]);
  long long memo = a[0];
  for (long long i = 1; i < n; i++) {
    if (memo < a[i])
      memo = a[i];
    else if (memo > a[i] && vec[vec.size() - 1] < memo) {
      vec.push_back(memo);
      vec.push_back(a[i]);
      memo = a[i];
    }
  }
  vec.push_back(memo);
  long long res = 1000;
  for (long long i = 0; i < vec.size(); i += 2) {
    res = res + (res / vec[i]) * (vec[i + 1] - vec[i]);
  }
  cout << res << endl;
}
