#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const double pi = acos(-1);
const double eps = 1e-2;
int a[205];
int main() {
  int n, ans = 1000, cnt = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int s = 0, x = 0;
  a[n] = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      if (x == 1) x = 0;
      if (s == 0) {
        s = 1;
        cnt += ans / a[i];
        ans -= cnt * a[i];
      }
    } else if (a[i] > a[i + 1]) {
      if (s == 1) s = 0;
      if (x == 0) {
        x = 1;
        ans += cnt * a[i];
        cnt = 0;
      }
    }
  }
  cout << ans << endl;
}
