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