#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 3;
template <typename T>
istream &operator>>(istream &os, vector<T> &v) {
  for (auto &e : v) os >> e;
  return os;
}
template <typename T>
void print(vector<T> &v, string sep = " ", string end = "\n") {
  for (auto it = v.begin(); it != v.end() - 1; ++it) {
    cout << *it << sep;
  }
  cout << v.back() << end;
}
vector<int> my_primes;
void computePrimes(int mx) {
  my_primes.assign(mx + 1, 0);
  for (int i = 2; i < mx; i += 1)
    if (my_primes[i] == 0)
      for (int j = i + i; j < mx; j += i)
        if (my_primes[j] == 0) my_primes[j] = i;
  my_primes[0] = my_primes[1] = -1;
}
inline bool isPrime(int x) { return my_primes[x] == 0; }
int main(int argc, char const *argv[]) {
  int n;
  vector<int> v(n);
  cin >> v;
  long long curMoney = 1000;
  for (int i = 0; i < n - 1; ++i) {
    long long stocks = 0;
    if (v[i] < v[i + 1]) stocks = curMoney / v[i];
    curMoney += (v[i + 1] - v[i]) * stocks;
  }
  cout << curMoney;
}
