#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> arr;
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    arr.push_back(a);
  }
  ll m = 1000;
  for (int i = 1; i < n; i++) {
    if (arr[i] <= arr[i - 1]) continue;
    int s = arr[i - 1];
    int count = m / s;
    m += (arr[i] - s) * count;
  }
  cout << m << endl;
  return 0;
}
