#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n{0};
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long profit{0};
  long long current = 1000;
  for (long long i = 1; i < n; i++) {
    if (arr[i] > arr[i - 1]) {
      profit = profit + (current % arr[i - 1]);
      current = (current / arr[i - 1]) * arr[i];
    }
  }
  profit = profit + current;
  cout << profit << endl;
  return 0;
}
