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