#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  char bs[n + 1];
  bs[0] = '-';
  bs[n] = '-';
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) {
    if (a[i - 1] < a[i]) {
      bs[i] = '/';
    }
    if (a[i - 1] == a[i]) {
      bs[i] = '-';
    }
    if (a[i - 1] > a[i]) {
      bs[i] = '\\';
    }
  }
  long long money = 1000;
  long long kabu = 0;
  int mins, maxs, t;
  for (int i = 1; i < n; i++) {
    if (bs[i] == '/') {
      mins = a[i - 1];
      kabu = money / mins;
      money -= kabu * mins;
    }
    if (bs[i] == '\\') {
      maxs = a[i - 1];
      money += kabu * maxs;
      kabu = 0;
    }
    t = a[i];
  }
  cout << money + kabu * t << endl;
}
