#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[89];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long mn = a[0], mx = a[0], prev = a[0];
  long long have = 1000;
  for (int i = 1; i < n; i++) {
    mx = max(a[i], mx);
    if ((prev > a[i] && mn < mx && prev == mx) || (i == n - 1 && mn < a[i])) {
      have = have / mn * mx + have % mn;
      mn = a[i];
      mx = a[i];
    }
    mn = min(a[i], mn);
    prev = a[i];
  }
  cout << have << endl;
}
