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