#include <bits/stdc++.h>
using namespace std;
pair<int, int> crack(int n) {
  int st = sqrt(n);
  int fac = n / st;
  while (n % st) {
    st += 1;
    fac = n / st;
  }
  return make_pair(st, fac);
}
inline long long qpow(long long a, int n) {
  long long ans = 1;
  for (; n; n >>= 1) {
    if (n & 1) ans *= 1ll * a;
    a *= a;
  }
  return ans;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int maxn = 80 + 10;
int a[maxn];
int n;
void solve(int& money, int& stock) {
  for (int i = (1); i <= (n); i++) {
    if (a[i] > a[i + 1]) {
      money += a[i] * stock;
      stock = 0;
    } else {
      int t = money / a[i];
      int d = money % a[i];
      stock += t;
      money = d;
    }
  }
}
void init() {}
int main() {
  init();
  cin >> n;
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  int money = 1000, stock = 0;
  solve(money, stock);
  printf("%d\n", money);
}
