#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
template <typename A, size_t N, typename T>
void FILL(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const long long INF = 1LL << 60;
const long long MOD = 1000000007LL;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  long long sum = 1000;
  long long stock = 0;
  vector<int> a(n + 2);
  a[0] = 1000;
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (a[i - 1] >= a[i] && a[i] < a[i + 1]) {
      stock = sum / a[i];
      sum -= stock * a[i];
    } else if (a[i - 1] <= a[i] && a[i] > a[i + 1]) {
      sum += stock * a[i];
      stock = 0;
    }
  }
  cout << sum;
  cout << endl;
  return 0;
}
