#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
using namespace std;
constexpr int INF = 1 << 30;
constexpr long long LINF = 1LL << 60;
constexpr long long mod = 1e9 + 7;
constexpr int NIL = -1;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int a[100];
int n;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> a[i];
  int left, right;
  left = 0;
  right = 1;
  int money = 1000;
  int stock = 0;
  while (right < n) {
    while (right <= n - 2 and
           (a[left + 1] - a[left]) * (a[right + 1] - a[right]) > 0)
      right++;
    if (right == n - 1 and a[left] >= a[right]) break;
    if (a[left] <= a[right]) {
      int num = money / a[left];
      money += (a[right] - a[left]) * num + stock * a[right];
      stock = 0;
    } else {
      stock += money / a[right];
      money -= stock * a[right];
    }
    left = right;
    right++;
  }
  cout << money << "\n";
  return 0;
}
