#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  ll x = 1000;
  for (int i = 0; i < (int)(n - 1); i++) {
    int s = a[i];
    int t = a[i - 1];
    if (s < t) {
      ll k = x / s;
      x %= s;
      x += k * t;
    }
  }
  cout << x << endl;
  return 0;
}
