#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  ;
  int n;
  int x = 1000;
  cin >> n;
  int a[n + 4];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int i = 0;
  int j = 0;
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (a[i] < a[j]) {
        int c = x / a[i];
        x -= (a[i] * (c));
        x += a[j] * (c);
        i = j;
        break;
      } else {
        break;
      }
    }
  }
  cout << x;
}
