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