#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long n, cnt = 1000;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    int stock = 0;
    if (a[i + 1] > a[i]) stock = cnt / a[i];
    cnt += (a[i + 1] - a[i]) * stock;
  }
  cout << cnt << endl;
}
