#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  int balance = 1000, stock = 0;
  for (auto &x : a) cin >> x;
  for (int i = 0; i < n; i++) {
    if (i != n - 1 && a[i] < a[i + 1]) {
      int temp = balance / a[i];
      balance %= a[i];
      stock += temp;
    } else if (i == n - 1 || a[i] > a[i + 1]) {
      balance += (stock * a[i]);
      stock = 0;
    }
  }
  cout << balance << "\n";
  return 0;
}
