#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> nums(n + 1);
  for (int i = 0; i < n; ++i) cin >> nums[i];
  int tot = 1000, cnt = 0;
  bool chk = false;
  for (int i = 0; i + 1 <= n; ++i) {
    if (chk) {
      tot += cnt * nums[i];
      chk = false;
      cnt = 0;
    }
    if (nums[i] < nums[i + 1]) {
      cnt = (tot / nums[i]);
      tot -= cnt * nums[i];
      chk = true;
    }
  }
  cout << tot;
}
