#include <bits/stdc++.h>
using namespace std;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
long long power(long long a, long long n, long long p) {
  if (n == 0) {
    return 1;
  } else if (n % 2 == 0) {
    long long ans = power(a, n / 2, p);
    return (ans * ans) % p;
  } else {
    long long ans = power(a, n - 1, p);
    return (ans * a) % p;
  }
}
long long inverse(long long a, long long p) { return power(a, p - 2, p); }
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> v;
  for (int i = 0; i < n; i++) {
    if (i == n - 1 || a[i] != a[i + 1]) {
      v.push_back(a[i]);
    }
  }
  int x = v.size();
  int i = 0;
  int amount = 1000;
  while (i < x - 1) {
    if (v[i] < v[i + 1]) {
      int j = i;
      while (j < x) {
        if (j == x - 1 || v[j] > v[j + 1]) {
          break;
        }
        j++;
      }
      if (j < x) {
        amount += (amount / v[i]) * (v[j] - v[i]);
      }
      i = j + 1;
    } else {
      i++;
    }
  }
  cout << amount << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
