#include <bits/stdc++.h>
using namespace std;
long long N = 1000000007;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, i, CurrentMoney = 1000, Stocks;
  cin >> n;
  long long A[n];
  for (i = 1; i <= n; i++) cin >> A[i];
  for (i = 1; i <= n - 1; i++) {
    Stocks = 0;
    if (A[i] < A[i + 1]) Stocks = CurrentMoney / A[i];
    CurrentMoney += (A[i + 1] - A[i]) * Stocks;
  }
  cout << CurrentMoney << endl;
}
