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