#include <bits/stdc++.h>
using namespace std;
const char en = '\n';
void solve() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int m = 1000;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      int t = m / a[i - 1];
      m = m % a[i - 1];
      m += t * a[i];
    }
  }
  cout << m << en;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
