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