#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << showpoint;
  cout << setprecision(11);
  int t = 1, x = 0;
  while (t--) {
    int n;
    cin >> n;
    long long int ar[n];
    for (long long int &x : ar) cin >> x;
    long long int mn = 1000;
    int i = 0, j = 1;
    long long int ans = 0;
    while (j < n) {
      if (ar[j] >= ar[j - 1])
        j++;
      else {
        if (j > 1) {
          if (ar[j - 2] <= ar[j - 1]) {
            mn = (mn - floor(mn / ar[i]) * ar[i]) +
                 floor(mn / ar[i]) * ar[j - 1];
            i = j;
          }
        }
        j++;
      }
    }
    if (ar[j - 1] >= ar[j - 2]) {
      mn = (mn - floor(mn / ar[i]) * ar[i]) + floor(mn / ar[i]) * ar[j - 1];
    }
    cout << mn << "\n";
  }
  return 0;
}
