#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, cur = 300, total = 1000, stock = 0, s = -1, b = -1;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) {
    if (b == -1) {
      if (arr[i] <= cur)
        cur = arr[i];
      else
        b = cur;
    }
    if (b != -1) {
      if (arr[i] >= cur)
        cur = arr[i];
      else
        s = cur;
      if (i == n - 1 && cur > b) s = cur;
    }
    if (s != -1 && b != -1) {
      stock = total / b;
      total -= stock * b;
      total += stock * s;
      stock = 0;
      b = -1;
      s = -1;
      i--;
      cur = 300;
    }
  }
  cout << total << endl;
  return 0;
}
