#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int money = 1000, mx = 1000;
    int st = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] < a[i + 1] && st == 0 && i < n - 1) {
        st = money / a[i];
        money = money % a[i];
      } else if (a[i] > a[i - 1] && st > 0 && i > 0) {
        money += st * a[i];
        st = 0;
      }
      mx = max(money, mx);
    }
    cout << mx << endl;
  }
}
