#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, now = 1000, buy = 0, maxv = 1000;
  cin >> n;
  long long a[n + 1], j = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> a[j];
    if (j != 1 && a[j] != a[j - 1]) {
      j++;
    }
  }
  j--;
  for (long long i = 1; i < j; i++) {
    if (a[i + 1] > a[i]) {
      now = now % a[i] + now / a[i] * a[i + 1];
    }
  }
  cout << now;
  return 0;
}
