#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  int n;
  cin >> n;
  vector<int> A(n + 1);
  for (int i = 0; i < n; i++) cin >> A[i];
  A[n] = 0;
  long long int money = 1000;
  ll stack = 0;
  for (int i = 0; i < n; i++) {
    if (A[i] < A[i + 1]) {
      stack = money / A[i];
      money -= (ll)stack * A[i];
    }
    if (A[i] > A[i + 1]) {
      money += (ll)stack * A[i];
      stack = 0;
    }
  }
  cout << money << endl;
  return 0;
}
