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