#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  int mx = 0;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    mx = max(a[i], mx);
  }
  int prev = a[0];
  int money = 1000;
  int stock = 0;
  for (int i = 1; i < (n); ++i) {
    if (prev < a[i]) {
      int gain = money / prev;
      stock += gain;
      money -= gain * prev;
    }
    if (prev > a[i]) {
      money += prev * stock;
      stock = 0;
    }
    if (a[i] == mx) {
      money += stock * mx;
      break;
    }
    prev = a[i];
  }
  cout << money << endl;
  return 0;
}
