#include <bits/stdc++.h>
using namespace std;
int makeMaxProfit(vector<int>& arr, int n, int amt) {
  long long int currentMoney = amt;
  for (int i = 0; i < n - 1; ++i) {
    if (arr[i] < arr[i + 1]) {
      long long int numStocks = currentMoney / arr[i];
      currentMoney += 1LL * (arr[i + 1] - arr[i]) * numStocks;
    }
  }
  return currentMoney;
}
int main() {
  int initialAmount = 1000;
  int n;
  cin >> n;
  vector<int> arr;
  for (auto& it : arr) cin >> it;
  cout << makeMaxProfit(arr, n, initialAmount);
}
