#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[1000], b[1000], var, temp_var, j;
  long long maxcost = 1000;
  bool check = true;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (a[j] > a[i]) {
        var = maxcost / a[i];
        maxcost = maxcost - var * a[i] + var * a[j];
        i = j;
        break;
      } else if (a[j] < a[i]) {
        i = j;
        break;
      }
    }
  }
  cout << maxcost << '\n';
  return 0;
}
