#include <bits/stdc++.h>
using namespace std;
const int ss = 3e5 + 5;
int main() {
  int t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long ar[n];
    for (int i = 0; i < n; i++) {
      cin >> ar[i];
    }
    int i = 0;
    long long cur = 1000;
    while (i < n - 1) {
      while (i < (n - 1) and ar[i + 1] <= ar[i]) {
        i++;
      }
      if (i == n - 1) break;
      int buy = i++;
      int st = (cur / ar[buy]);
      cur -= (st * ar[buy]);
      while (i < n and ar[i] >= ar[i - 1]) {
        i++;
      }
      int sell = i - 1;
      cur += (st * ar[sell]);
    }
    cout << cur << endl;
  }
  return 0;
}
