#include <bits/stdc++.h>
using namespace std;
template <class array>
inline void array_input(array a[], size_t n) {
  for (size_t i = 0; i < n; i++) cin >> a[i];
}
template <class array>
inline void array_init(array a[], array value, size_t n) {
  for (size_t i = 0; i < n; i++) a[i] = value;
}
int main() {
  {
    int n;
    cin >> n;
    int a[n];
    array_input(a, n);
    int total = 1000, stock = 0;
    int low = 201, high = 0;
    bool stat = false;
    for (int i = 0; i < n; i++) {
      if (a[i] < low) {
        low = a[i];
        stat = true;
      } else if (stat && a[i] > high) {
        while (i < n && a[i + 1] > a[i]) i++;
        high = a[i];
        stock = total / low;
        total += stock * (high - low);
        low = 201;
        high = 0;
        stat = false;
      }
    }
    cout << total << '\n';
  }
  return 0;
}
