#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 1;
int main() {
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n + 1];
    a[0] = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
    }
    long long mon = 1000, init = 1000, stcks = 0;
    bool ok;
    int p = 1;
    for (int i = 1; i <= n; i += p) {
      if (a[i] != a[i - 1]) {
        ok = false;
        for (int j = i + 1; j <= n; j++) {
          if (a[j] > a[i]) {
            ok = true;
            p = j;
            break;
          }
        }
        if (ok) {
          long long buy = mon / a[i];
          long long sell = buy * a[p];
          long long used = buy * a[i];
          mon -= used;
          mon += sell;
        }
      }
    }
    cout << mon << "\n";
  }
  return 0;
}
