#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long MOD = 1e9 + 7;
const long long MOD2 = 998244353;
const long long LINF = 1e18;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (long long i = (1); i <= (n); i++) {
    cin >> a[i];
  }
  int money = 1000, kabu = 0;
  for (long long i = (1); i <= (n); i++) {
    if (i != n && a[i + 1] >= a[i]) {
      int tmp = money / a[i];
      kabu += tmp;
      money -= tmp * a[i];
    } else {
      money += kabu * a[i];
      kabu = 0;
    }
  }
  cout << (money) << endl;
  return 0;
}
