#include <bits/stdc++.h>
using namespace std;
long long INF = 1 << 28;
const double PI = acos(-1.0);
int dir[4][2] = {1, 0, -1, 0, 0, -1, 0, 1};
int knight[8][2] = {1, 2, 1, -2, 2, 1, 2, -1, -1, 2, -1, -2, -2, 1, -2, -1};
const long double EPS = 1e-7;
struct compare {
  bool operator()(const pair<int, pair<int, int> >& l,
                  const pair<int, pair<int, int> >& r) {
    if (l.first == r.first) {
      return l.second.first > r.second.first;
    }
    return l.first < r.first;
  }
};
const int mx = 500150;
int mod = 1000000007;
long long arr[mx];
int main() {
  int t, tc = 1;
  t = 1;
  while (t--) {
    int k, n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &arr[i]);
    }
    long long val = 1000;
    int i = 1;
    while (i < n) {
      if (arr[i] > arr[i - 1]) {
        int k = val / arr[i - 1];
        val %= arr[i - 1];
        val += (arr[i] * k);
        i += 2;
      } else
        i++;
    }
    cout << val << endl;
  }
  return 0;
}
