#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
vector<int> dx = {-1, -1, -1, 0, 0, 1, 1, 1};
vector<int> dy = {-1, 0, 1, -1, 1, -1, 0, 1};
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<int> buy, sell;
  if (a[0] <= a[1]) buy.push_back(0);
  for (int i = 0; i < (n - 2); i++) {
    if (a[i] > a[i + 1] && a[i + 1] <= a[i + 2]) buy.push_back(i + 1);
    if (a[i] < a[i + 1] && a[i + 1] >= a[i + 2]) sell.push_back(i + 1);
  }
  if (a[n - 2] <= a[n - 1]) sell.push_back(n - 1);
  int l = sell.size();
  int m = 1000;
  int stock = 0;
  for (int i = 0; i < (l); i++) {
    stock = m / a[buy[i]];
    m -= stock * a[buy[i]];
    m += stock * a[sell[i]];
    stock = 0;
  }
  cout << m << endl;
  return 0;
}
