#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[200], b = 1000, n, k = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int j = 1, c[100], d[100];
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i + 1] >= a[i]) {
      continue;
    } else {
      int z = b % a[j];
      b /= a[j];
      b *= a[i];
      b += z;
      j = i + 1;
    }
  }
  cout << b << endl;
}
