#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int n;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; ++i) cin >> ar[i];
  int currentmoney = 1000;
  for (int i = 0; i < n - 1; ++i) {
    long long int stocks = 0;
    if (ar[i] < ar[i + 1]) {
      stocks = currentmoney / ar[i];
      currentmoney += (ar[i + 1] - ar[i]) * stocks;
    }
  }
  cout << currentmoney;
  return 0;
}
