#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  ll a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll kane = 1000;
  ll kabu = 0;
  ll sell = 0;
  ll last = -1;
  bool buy_turn = true;
  for (int day = 0; day < n; day++) {
    ll now = a[day];
    if (day == n - 1 && kabu != 0) {
      kane += kabu * now;
      kabu = 0;
      break;
    }
    if (buy_turn) {
      if (now == last) continue;
      for (int i = day + 1; i < n; i++) {
        if (now < a[i]) {
          kabu = kane / now;
          kane -= kabu * now;
          sell = a[i];
          buy_turn = false;
          break;
        } else {
        }
      }
    } else {
      if (now == sell) {
        kane += kabu * now;
        kabu = 0;
        buy_turn = true;
      }
    }
    last = now;
  }
  cout << kane << endl;
  return 0;
}
