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