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