#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int cnt = 0;
  cin >> n;
  vector<int> a(n + 1, 0);
  vector<int> b(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i + 1] > a[i]) {
      b[i] = 1;
    }
    if (a[i + 1] < a[i]) {
      b[i] = 2;
    }
  }
  int base = 1000;
  int state = 0;
  if (n == 2) {
    if (a[0] < a[1]) {
      cnt = (int)(base / a[0]);
      base = base - cnt * a[0] + cnt * a[1];
      cout << base;
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    if ((b[i] == 1) && (state != 1)) {
      state = 1;
      cnt = (int)(base / a[i]);
      base = base - cnt * a[i];
    }
    if ((b[i] == 2) && (state == 1)) {
      state = 2;
      base = base + cnt * a[i];
      cnt = 0;
    }
    if ((i == n - 1) && (state == 1)) {
      base += cnt * a[i];
    }
  }
  cout << base;
}
