#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int num[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> num[i];
  }
  int kabu = 0, money = 1000;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (num[i] < num[i + 1]) {
      kabu = money / num[i];
      money %= num[i];
      money += kabu * num[i + 1];
      kabu = 0;
    } else {
      continue;
    }
  }
  cout << money << endl;
}
