#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
struct aaa {
  aaa() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} aaa;
int main() {
  int n;
  cin >> n;
  vector<int64> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int64 money = 1000;
  int begin = 0;
  for (int i = 1; i < n; i++) {
    if (a[i - 1] <= a[i]) continue;
    int stock = money / a[begin];
    money -= a[begin] * stock;
    money += a[i - 1] * stock;
    begin = i;
  }
  if (a[begin] < a[n - 1]) {
    int stock = money / a[begin];
    money -= a[begin] * stock;
    money += a[n - 1] * stock;
  }
  cout << money << endl;
}
