#include <bits/stdc++.h>
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;
}
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int money = 1000;
  for (int i = 0; i < (int)(n - 1); i++) {
    ll num = 0;
    if (a[i] < a[i + 1]) num = money / a[i];
    money += (a[i + 1] - a[i]) * num;
  }
  cout << money << endl;
  ;
}
