#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long mini = a[0], maxi = a[0], i = 0, ans = 1000, flag = 1;
  while (i < n) {
    mini = 200;
    maxi = 100;
    while (i < n) {
      if (a[i] < mini) {
        mini = a[i];
      } else
        break;
      if (i == n - 1) flag = 0;
      i++;
    }
    while (i < n) {
      if (a[i] > maxi) {
        maxi = a[i];
      } else
        break;
      i++;
    }
    if (flag) ans += (maxi - mini) * (ans / mini);
    i++;
  }
  cout << ans;
  return 0;
}
