#include <bits/stdc++.h>
#pragma target("avx")
#pragma optimize("O3")
using ll = int_fast64_t;
using P = std::pair<ll, ll>;
using PP = std::pair<ll, P>;
using V = std::vector<ll>;
template <typename T>
using pq = std::priority_queue<T>;
template <typename T>
using rpq = std::priority_queue<T, std::vector<T>, std::greater<T>>;
const int MOD = 1e9 + 7;
const ll INF = 1e18;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
int main() {
  int n;
  scanf("%d", &n);
  std::vector<int> a(n);
  for (ll i = 0; i < n; i++) scanf("%d", &a[i]);
  a.push_back(0);
  int sell = a[0], ans = 1000;
  for (ll i = 0; i < n; i++) {
    if (sell > a[i]) sell = a[i];
    if (a[i] > a[i + 1]) {
      ans = ans % sell + ans / sell * a[i];
      sell = a[i];
    }
  }
  printf("%d\n", ans);
  return 0;
}
