#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  pair<int, int> tmp;
  pair<int, int> st;
  for (int i = 1; i < n + 1; i++) {
    cin >> a[i];
  }
  int bl = 1000;
  deque<pair<int, int>> d;
  int num;
  int sn = 0;
  for (int i = 1; i < n + 1; i++) {
    num = 0;
    if (bl > 0 && i != n) {
      if (a[i + 1] > a[i]) {
        num = bl / a[i];
        bl %= a[i];
      }
    }
    if (i == n) {
      bl += a[i] * sn;
      sn = 0;
    } else {
      if (a[i] > a[i + 1]) {
        bl += a[i] * sn;
        sn = 0;
      }
    }
    sn += num;
  }
  cout << bl;
}
