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