#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  ll stock = 0, money = 1000;
  for (int i = 0; i < (n); i++) {
    if (i == n - 1) {
      money += stock * a[i];
      continue;
    }
    if (a[i + 1] > a[i]) {
      stock = money / a[i];
      money -= stock * a[i];
    } else if (a[i + 1] < a[i]) {
      money += stock * a[i];
      stock = 0;
    }
  }
  cout << money << '\n';
  return 0;
}
