#include <bits/stdc++.h>
using namespace std;
struct debugger {
  static void call(string::iterator it, string::iterator ed) {}
  template <typename T, typename... aT>
  static void call(string::iterator it, string::iterator ed, T a, aT... rest) {
    string b;
    for (; *it != ','; ++it)
      if (*it != ' ') b += *it;
    cerr << b << " = " << a << " ";
    call(++it, ed, rest...);
  }
};
template <typename T>
T Max(T a) {
  return a;
}
template <typename T, typename... Args>
T Max(T a, Args... args) {
  return a > Max(args...) ? a : Max(args...);
}
template <typename T>
T Min(T a) {
  return a;
}
template <typename T, typename... Args>
T Min(T a, Args... args) {
  return a < Min(args...) ? a : Min(args...);
}
const double GOLD = (1.0 + sqrt(5.0)) / 2.0;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = 3.141592653589793;
const double E = 2.718281828459045;
long long int expo(long long int a, long long int n) {
  long long int result = 1;
  while (n) {
    if (n % 2) result *= a;
    a *= a;
    n /= 2;
  }
  return result;
}
long long int mod_expo(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int money = 1000;
  for (int i = 0; i < n; i++) {
    long long int stock = 0;
    if (v[i] < v[i + 1]) stock = money / v[i];
    money += ((v[i + 1] - v[i]) * stock);
  }
  cout << money << endl;
  cerr << "time = " << clock() << " ms" << '\n';
  return 0;
}
