#include <bits/stdc++.h>
using namespace std;
void Main() {
  long long N;
  scanf("%lld", &N);
  ;
  vector<long long> as(N);
  vector<long long> i_ac(N, 0);
  vector<long long> im_ac(N, 0);
  long long prev_a = 1000;
  for (long long i = 0; i < N; ++i) {
    scanf("%lld", &as[i]);
    ;
    if (as[i] > prev_a) {
      im_ac[i - 1] = 1;
      i_ac[i] = -1;
    } else if (as[i] < prev_a && i != 0) {
      im_ac[i - 1] = -1;
      i_ac[i] = 1;
    }
    prev_a = as[i];
  }
  long long now_m = 1000;
  long long now_s = 0;
  for (long long i = 0; i < N; ++i) {
    if (i == 0) {
      if (im_ac[i] == 1) {
        now_s = now_m / as[i];
        now_m = now_m - now_s * as[i];
      }
    } else {
      if (im_ac[i] == -1) {
        bool found = false;
        for (long long j = i - 1; j >= 0; j--) {
          if (im_ac[j] == 1) {
            found = true;
            break;
          }
        }
        if (found) {
          now_m = now_m + now_s * as[i];
          now_s = 0;
        }
      } else if (im_ac[i] == 1) {
        bool found = false;
        for (long long j = i - 1; j >= 0; j--) {
          if (im_ac[j] == -1) {
            found = true;
            break;
          }
        }
        if (found) {
          long long this_add = now_m / as[i];
          now_m = now_m - this_add * as[i];
          now_s += this_add;
        }
      }
    }
  }
  now_m += now_s * as[N - 1];
  cout << now_m << endl;
}
int main() { Main(); }
