#include <bits/stdc++.h>
using ll = long long;
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<bool> up(n + 1, false);
  for (int i = 0; i < n - 1; i++)
    if (a[i] < a[i + 1]) up[i + 1] = true;
  int ans = 1000;
  for (int i = 0; i < n; i++) {
    if (up[i]) {
      int now = i - 1;
      bool ok = false;
      while (i <= n) {
        if (up[i])
          i++;
        else {
          ok = true;
          break;
        }
      }
      if (ok) {
        int cnt = ans / a[now];
        ans -= cnt * a[now];
        ans += cnt * a[i - 1];
      }
    }
  }
  cout << ans;
  return 0;
}
