#include <bits/stdc++.h>
using namespace std;
int a[83];
int main() {
  int n, price = 1000;
  cin >> n;
  a[0] = 201;
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int count = 1;
  while (1) {
    int nowprice = a[count];
    for (int i = count + 1; i <= n; i++) {
      count = i;
      if (a[i] <= a[i - 1])
        nowprice = a[i - 1];
      else {
        count = i - 1;
        break;
      }
    }
    if (count >= n) break;
    int c = price / nowprice;
    int d = price % nowprice;
    for (int i = count + 1; i <= n; i++) {
      count = i;
      if (a[i] > a[i + 1]) {
        c *= a[i];
        count = i;
        break;
      }
    }
    price = c + d;
    if (count >= n - 1) break;
  }
  cout << price;
  return 0;
}
