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