#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < n; i++) {
    bool larger = false;
    bool cont = false;
    for (int j = i + 1; j < n; j++) {
      if (a[j] >= a[i]) larger = true;
      for (int k = j + 1; k < n; k++) {
        if (a[k] >= a[i] && a[i] >= a[j] && k > j) {
          cont = true;
        }
      }
    }
    if (larger && !cont) {
      stock += money / a[i];
      money -= money / a[i] * a[i];
    } else {
      money += a[i] * stock;
      stock = 0;
    }
  }
  cout << money << endl;
}
