#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  int yen = 1000;
  int kabusu = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    if (i == n - 1) {
      int urine = kabusu * a[i];
      yen += urine;
      kabusu = 0;
    } else if (a[i] < a[i + 1]) {
      int kounyu = yen / a[i];
      kabusu += kounyu;
      yen -= kounyu * a[i];
    } else if (a[i] > a[i + 1]) {
      int urine = kabusu * a[i];
      yen += urine;
      kabusu = 0;
    }
  }
  cout << yen << endl;
}
