#include <bits/stdc++.h>
using namespace std;
const unsigned long long BASE = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int* a = new int[n + 2];
  int* todo = new int[n];
  a[0] = 10000;
  for (int i = 0; i < n; i++) {
    cin >> a[i + 1];
  }
  a[n + 1] = 0;
  int money = 1000, kabu = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] <= a[i - 1] && a[i] < a[i + 1]) {
      kabu = money / a[i];
      money = money % a[i];
    } else if (a[i] > a[i - 1] && a[i] >= a[i + 1]) {
      money += kabu * a[i];
      kabu = 0;
    }
  }
  cout << money << endl;
  delete[] a;
  delete[] todo;
  return 0;
}
