#include <bits/stdc++.h>
using namespace std;
double pi = 3.141592653589793238;
const int M = 1e9 + 7;
const int Nmax = 5005;
const int MM = 1e7 + 1;
const int N = 200010;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    long long int n;
    cin >> n;
    long long int arr[n + 1];
    for (int i = 0; i < n; i++) cin >> arr[i];
    long long int ans = 1000;
    for (int i = 0; i < n - 1; i++) {
      long long int s = 0;
      if (arr[i] < arr[i + 1]) s = ans / arr[i];
      ans += ((arr[i + 1] - arr[i]) * s);
    }
    cout << ans << endl;
  }
  return 0;
}
