#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
int A[80];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<pair<int, int>> trade;
  int buy = INF;
  int sell = 0;
  bool buying = true;
  for (int i = 0; i < N; i++) {
    if (A[i] > buy) buying = false;
    if (buying) {
      buy = min(buy, A[i]);
    } else {
      sell = max(sell, A[i]);
      if (A[i] < sell) {
        trade.push_back(make_pair(buy, sell));
        buying = true;
        buy = A[i];
        sell = 0;
      }
    }
  }
  if (buying == false) {
    trade.push_back(make_pair(buy, sell));
  }
  int money = 1000;
  for (pair<int, int> t : trade) {
    int buy = t.first;
    int sell = t.second;
    int stock = money / buy;
    money = money - stock * buy + stock * sell;
  }
  int ans = money;
  cout << ans << endl;
  return 0;
}
