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