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