#include <bits/stdc++.h>
using namespace std;
string str;
unsigned long long int bin(unsigned long long int a, unsigned long long int n) {
  unsigned long long int res = 1;
  while (n) {
    if (n & 1) res = 1LL * res * a % 998244353;
    a = 1LL * a * a % 998244353;
    n >>= 1;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    int a = 205, b = 1000, c = 0, d = 1000;
    for (int i = 0; i < n; i++) {
      if (arr[i] < a) {
        if (i != 0) b += a * c;
        c = b / arr[i];
        b = b % arr[i];
        a = arr[i];
      } else if (arr[i] > a) {
        b += arr[i] * c;
        d = max(b, d);
        c = b / arr[i];
        b = b % arr[i];
        a = arr[i];
      }
    }
    if (a != 205) d = max(d, b + a * c);
    cout << d;
  }
  return 0;
}
