#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long>;
using vvll = vector<vll>;
using vs = vector<string>;
using pll = pair<long long, long long>;
int main() {
  int n, kabu = 0, money = 1000, kabuk;
  cin >> n;
  vll a(n);
  for (long long(i) = 0; (i) < (n); (i)++) cin >> a.at(i);
  for (long long(i) = 0; (i) < (n - 1); (i)++) {
    if (a.at(i) < a.at(i + 1)) {
      kabuk = money / a.at(i);
      money -= a.at(i) * kabuk;
      kabu += kabuk;
    } else if (a.at(i) > a.at(i + 1)) {
      money += kabu * a.at(i);
      kabu = 0;
    }
  }
  money += a.at(n - 1) * kabu;
  cout << money << endl;
}
