#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M = 1000, K = 0;
  cin >> N;
  int A[N];
  for (int i = 0; i < (int)(N); i++) {
    cin >> A[i];
  }
  for (int i = 0; i < (int)(N - 1); i++) {
    if (A[i] < A[i + 1]) {
      K += (M / A[i]);
      M = M % A[i];
    }
    if (A[i] > A[i + 1]) {
      M += A[i] * K;
      K = 0;
    }
  }
  M += K * A[N - 1];
  cout << M << "\n";
}
