#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n, cnt = 0, sum = 1000, a[n];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      while (sum >= a[i]) {
        sum -= a[i];
        cnt++;
      }
    } else {
      if (cnt) {
        while (cnt > 0) {
          sum += a[i];
          cnt--;
        }
        cnt = 0;
      }
    }
    if (i == n - 1) {
      if (cnt) {
        while (cnt > 0) {
          sum += a[i];
          cnt--;
        }
        cnt = 0;
      }
      break;
    }
  }
  cout << sum << endl;
}
