#include <bits/stdc++.h>
using namespace std;
int n;
int a[100];
int maxProfit(int* prices, int pricesSize) {
  if (pricesSize == 0) return 0;
  int mony = 1000;
  for (int i = 1; i < pricesSize; i++)
    if (prices[i] > prices[i - 1])
      mony += (mony / prices[i - 1]) * (prices[i] - prices[i - 1]);
  return mony;
}
int main() {
  int i = 0;
  int t, k = 0, x;
  int sum = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long ans = maxProfit(a, n);
  cout << ans;
}
