#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, count = 0, k, z = 0, n = 0, i = 0, maxi = 1000, j = 0,
                         money = 1000, stock = 0;
  vector<long long int> arr;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> z;
    arr.push_back(z);
  }
  for (i = 0; i < n; i++) {
    z = arr[i];
    j = i + 1;
    money = 1000;
    stock = 1000 / z;
    money = money - z * stock;
    while (j < n) {
      if (arr[j] < z) {
        stock += money / arr[j];
        money = money - arr[j] * stock;
        z = arr[j];
        maxi = max(maxi, money);
      } else if (arr[j] > z) {
        if (stock > 0) {
          money += stock * arr[j];
          stock = 0;
          maxi = max(maxi, money);
          z = arr[j];
        }
      }
      j++;
    }
    maxi = max(maxi, money);
  }
  cout << maxi << endl;
}
