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