#include <bits/stdc++.h>
using namespace std;
void amax(int& x, int y) {
  if (x < y) x = y;
}
void amin(int& x, int y) {
  if (x > y) x = y;
}
int gcd(int a, int b) {
  if (b) {
    return gcd(b, a % b);
  }
  return a;
}
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
void solve1() {
  int n;
  cin >> n;
  if (n < 600)
    n = 8;
  else if (n < 800)
    n = 7;
  else if (n < 1000)
    n = 6;
  else if (n < 1200)
    n = 5;
  else if (n < 1400)
    n = 4;
  else if (n < 1600)
    n = 3;
  else if (n < 1800)
    n = 2;
  else
    n = 1;
  cout << n << '\n';
}
void solve2() {
  int a, b, c, k;
  cin >> a >> b >> c >> k;
  while (c <= b || b <= a) {
    if (k == 0) {
      cout << "No\n";
      return;
    }
    if (b <= a) {
      b <<= 1;
    } else {
      c <<= 1;
    }
    k--;
  }
  cout << "Yes\n";
}
void solve3() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < (n); i++) cin >> a[i];
  for (int i = (k); i <= (n - 1); i++) {
    if (a[i] > a[i - k])
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (n); i++) cin >> a[i];
  int x = 1000, i = 0;
  while (i < n - 1) {
    while ((i < n - 1) && (a[i + 1] <= a[i])) i++;
    if (i == n - 1) break;
    int buy = i++;
    while ((i < n) && (a[i] >= a[i - 1])) i++;
    int sell = i - 1;
    int cnt = x / a[buy];
    x += cnt * (a[sell] - a[buy]);
  }
  cout << x << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
}
