#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const long long MX = 1e18;
const int mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n - 1);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
    if (i == 0) continue;
    if (a[i - 1] <= a[i])
      b[i - 1] = 0;
    else
      b[i - 1] = 1;
  }
  long long money = 1000;
  int t = 0;
  for (int j = 0; j < n - 1; j++) {
    if (a[j] < a[j + 1]) {
      t = money / a[j];
      money += (a[j + 1] - a[j]) * t;
      t = 0;
    }
  }
  cout << money << endl;
}
