#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e6 + 7;
void my_dbg() { cout << endl; }
template <typename Arg, typename... Args>
void my_dbg(Arg A, Args... B) {
  cout << ' ' << A;
  my_dbg(B...);
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long a[n];
  long long max = INT_MIN, maxIndex = 0, min = INT_MAX, minIndex = 0;
  for (long long i = 0; i < (int)n; i++) {
    scanf("%lld", &a[i]);
  }
  long long ans = 1000;
  long long count = 0;
  if (a[0] < a[1]) {
    count = ans / a[0];
    ans = ans - (a[0] * count);
  }
  int flag = 0;
  for (long long i = 1; i < (int)n; i++) {
    if (a[i] > a[i - 1]) {
      while (a[i] >= a[i - 1] && i < n - 1) i++;
      if (a[i] > a[i - 1]) {
        ans = ans + (a[i] * count);
        count = 0;
      }
      if (a[i] < a[i - 1]) {
        ans = ans + (a[i - 1] * count);
        count = 0;
      }
    }
    if (i < n - 1) {
      if (a[i] < a[i + 1]) {
        while (a[i] < a[i - 1] && i < n - 1) i++;
        count = ans / a[i];
        ans = ans - (a[i] * count);
      }
    }
  }
  ans = ans + (a[n - 1] * count);
  cout << ans;
  return 0;
}
