#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N;
  cin >> N;
  long long int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  long long int money = 1000;
  long long int stocks = money / A[0];
  long long int leftMoney = money % A[0];
  for (int i = 1; i < N; i++) {
    if (A[i] > A[i - 1]) {
      int tempMoney = stocks * A[i];
      money = leftMoney + tempMoney;
      stocks = money / A[i];
      leftMoney = money % A[i];
    } else if (A[i] < A[i - 1]) {
      stocks = money / A[i];
      leftMoney = money % A[i];
    }
  }
  cout << money << endl;
  return 0;
}
