#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, tmp;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < (int)(n); i++) {
    cin >> tmp;
    a.push_back(tmp);
  }
  int money = 1000, co = 0, buy = 0, af = 0;
  for (int sell = (1); sell < (int)(n); sell++) {
    if (a.at(sell - 1) > a.at(sell)) {
      if (co > 0) {
        money += a.at(sell - 1) * co;
        co = 0;
      }
      buy = sell;
    } else if (a.at(sell - 1) == a.at(sell)) {
      if ((sell == n - 1) && (co > 0)) {
        money += a.at(sell) * co;
        co = 0;
      }
    } else if (a.at(sell - 1) < a.at(sell)) {
      af = money / a.at(buy);
      co += af;
      money -= a.at(buy) * af;
      if ((sell == n - 1) && (co > 0)) {
        money += a.at(sell) * co;
        co = 0;
      }
    }
  }
  cout << money << endl;
  return 0;
}
