#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long have = 1000LL;
  vector<long long> v;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      v.push_back(a[i]);
      v.push_back(a[i + 1]);
      i++;
    }
  }
  long long m = v.size();
  for (int i = 0; i < m; i++) {
    long long p = have / v[i];
    have -= p * v[i];
    have += p * v[i + 1];
    i++;
  }
  if (have < 1000LL)
    cout << 1000 << endl;
  else
    cout << have << endl;
  return 0;
}
