#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1ll << 61;
int a[85];
signed main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int nm = 1000, nk = 0;
  int mode = 0;
  for (int i = 0; i < n; i++) {
    if (mode == 0) {
      if (a[i] < a[i + 1]) {
        mode = 1;
        nk += nm / a[i];
        nm %= a[i];
      }
    } else {
      if (a[i] > a[i + 1]) {
        mode = 0;
        nm += nk * a[i];
        nk = 0;
      }
    }
  }
  cout << nm << endl;
}
