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