#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 1e9;
const long long INF = 1LL << 60;
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++) {
    if (a[i + 1] > a[i]) {
      int k = money / a[i];
      money %= a[i];
      money += k * a[i + 1];
    }
  }
  cout << money << endl;
}
