#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long N;
  cin >> N;
  vector<long long> arr(N);
  for (auto &it : arr) {
    cin >> it;
  }
  long long Min = INT_MAX;
  long long money = 1000;
  long long stocks = 0;
  for (auto it : arr) {
    if (it > Min) {
      long long kamayi = stocks * it;
      stocks = 0;
      money += kamayi;
      Min = INT_MAX;
    } else if (it <= Min) {
      long long change = (Min * stocks + money) % it;
      stocks = (Min * stocks + money) / it;
      money = change;
      Min = it;
    }
  }
  cout << money + stocks * Min;
}
