#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265359;
const long long INF = 1e12;
const long long MOD = 1e9 + 7;
const long long N = 1e5 + 5;
bool compare(const pair<int, int>& i, const pair<int, int>& j) {
  return i.second < j.second;
}
long long raise(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long n, a[100];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int i = 1, k = 1000;
  while (i < n) {
    while (i < n && a[i + 1] <= a[i]) i++;
    if (i == n) break;
    long long start = i++;
    while (i <= n && a[i] >= a[i - 1]) i++;
    long long end = i - 1;
    long long stock = k / a[start];
    k = k % a[start];
    k += stock * a[end];
  }
  cout << (k) << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
