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