#include <bits/stdc++.h>
using intl = long long;
using itnl = long long;
using uintl = unsigned long long;
using itn = int;
using ld = long double;
using namespace std;
const intl INF = 1e9;
const intl MOD = 1e9 + 7;
const ld EPS = 1.0e-14;
const ld PI = acos(-1);
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
void fp(bool f) { cout << (f ? "Yes" : "No") << endl; }
void fp(bool f, string s, string t) { cout << (f ? s : t) << endl; }
intl fact(intl k) {
  intl a = 1;
  for (int i = 2; i <= k; i++) {
    a *= i;
  }
  return a;
}
intl digit10(intl a) {
  intl b = 0;
  do {
    a /= 10;
    b++;
  } while (a);
  return b;
}
signed main() {
  cout << fixed << setprecision(10);
  intl n;
  cin >> n;
  intl a[n];
  for (intl i = 0; i < (intl)(n); i++) cin >> a[i];
  intl num = 0;
  intl money = 1000;
  for (intl i = 0; i < (intl)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      num += (money / a[i]);
      money -= (num * a[i]);
    } else if (a[i] > a[i + 1]) {
      money += (num * a[i]);
      num = 0;
    }
  }
  money += (num * a[n - 1]);
  num = 0;
  cout << money << endl;
  return 0;
}
