#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
const ll INF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  ll money = 1000, buy = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      buy = money / a[i];
      money = a[i + 1] * buy - (a[i] * buy);
    }
  }
  cout << max(money, 1000LL) << endl;
}
