#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int money = 1000;
  int a, b;
  cin >> b;
  for (int i = 2; i <= n; i++) {
    cin >> a;
    if (b < a) {
      int kabu = money / b;
      money -= kabu * b;
      money += kabu * a;
    }
    b = a;
  }
  cout << money << endl;
  return 0;
}
