#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  bool b[n - 1];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i > 0 && a[i] > a[i - 1])
      b[i - 1] = true;
    else
      b[i - 1] = false;
  }
  long long money = 1000;
  int ticket = 0;
  for (int i = 0; i < n - 1; i++) {
    if (b[i] == true) {
      ticket += money / a[i];
      money %= a[i];
      money += a[i + 1] * ticket;
      ticket = 0;
    }
  }
  cout << money << endl;
}
