#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N + 1];
  for (int i = 1; i <= N; ++i) cin >> A[i];
  bool jud = false;
  int balance = 1000;
  int stock = 0;
  for (int i = 1; i < N; ++i) {
    if (A[i + 1] < A[i]) {
      balance += A[i] * stock;
      stock -= stock;
    } else if (A[i + 1] > A[i]) {
      stock += balance / A[i];
      balance -= A[i] * stock;
    }
  }
  int ans = balance + stock * A[N];
  cout << ans << endl;
}
