#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
const long long N = 100005;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int bal = 1000;
  int x = 0;
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (x % 2 == 0) {
      int k = i;
      int j = i + 1;
      while (j < n && a[j] < a[k]) {
        k = j;
        j++;
      }
      if (j == n)
        break;
      else {
        int p = bal / a[k];
        int q = p * a[k];
        bal -= q;
        c = p;
        x++;
        i = k;
      }
    } else {
      int k = i;
      int j = i + 1;
      while (j < n && a[j] > a[i]) {
        k = j;
        j++;
      }
      bal += (c * a[k]);
      x++;
      i = k;
    }
  }
  cout << bal;
  return 0;
}
