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