#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  bool buy = false;
  long long prime = 400;
  long long now = 1000;
  long long cnt = 0;
  long long num;
  for (long long i = 0; i < n; i++) {
    if (buy == false and now >= a[i] and prime > a[i]) {
      num = now / a[i];
      now -= num * a[i];
      prime = a[i];
      cnt += num;
      buy = true;
    } else if (buy == true and prime < a[i]) {
      now += cnt * a[i];
      cnt = 0;
      buy = false;
      prime = a[i];
    }
  }
  if (buy == true) now += cnt * prime;
  cout << now << endl;
  return 0;
}
