#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long curmon = 1000;
  long long curstock = 0;
  for (long long i = 0; i < n; i++) {
    if (i == 0) {
      if (a[i] <= a[i + 1]) {
        curstock += curmon / a[i];
        curmon -= (curstock * a[i]);
      }
    } else if (i == n - 1) {
      if (a[i] >= a[i - 1]) {
        curmon += (curstock * a[i]);
        curstock = 0;
      }
    } else {
      if (a[i] >= a[i - 1] && a[i] >= a[i + 1]) {
        curmon += (curstock * a[i]);
        curstock = 0;
      } else if (a[i] <= a[i - 1] && a[i] <= a[i + 1]) {
        curstock += curmon / a[i];
        curmon -= (curstock * a[i]);
      }
    }
  }
  cout << curmon;
}
