#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, j, x = 1000, y, a[85];
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  y = x / a[0];
  x -= y * a[0];
  long long int cur = a[0];
  for (i = 1; i < n; i++) {
    if (a[i] > cur) {
      x += y * a[i];
      y = 0;
      cur = 1000000007;
    } else {
      x += y * (cur - a[i]);
      long long int tem = x / a[i];
      x -= tem * a[i];
      y += tem;
      cur = a[i];
    }
  }
  x += y * cur;
  cout << x;
  return 0;
}
