#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; (i) < (int)(n); i++) cin >> a[i];
  int now = 1e9;
  ll res = 1000;
  for (int i = 0; (i) < (int)(n); i++) {
    if (i == 0)
      now = a[i];
    else {
      if (now < a[i]) {
        res = (res / now) * a[i] + res % now;
        now = 1e9;
      } else {
        now = a[i];
      }
    }
  }
  cout << res << endl;
}
