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