#include <bits/stdc++.h>
using namespace std;
int N;
int A[100];
int main(void) {
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  long long ans = 1000;
  int sell = 0;
  int buy = A[1];
  int kabu = 0;
  for (int i = 2; i <= N; i++) {
    if (buy == 0) {
      buy = A[i];
      sell = 0;
    } else if (buy >= A[i]) {
      buy = A[i];
    } else {
      sell = A[i];
    }
    if (buy < sell) {
      if (i == N) {
        kabu = ans / buy;
        ans = ans + (sell - buy) * kabu;
        buy = 0;
      } else if (sell > A[i + 1]) {
        kabu = ans / buy;
        ans = ans + (sell - buy) * kabu;
        buy = 0;
      } else {
        sell = A[i];
      }
    }
  }
  cout << ans << endl;
  return 0;
}
