#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e5 + 5;
int n, a[85];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long k = 1000, s = 0;
  int cur = 0;
  for (int i = 0; i < n; i++) {
    int j = i + 1;
    if (!cur) {
      while (j < n && a[j] < a[i]) j++;
      j--;
      if (j != n - 1) s += k / a[i], k %= a[i];
    } else {
      while (j < n && a[j] > a[i]) j++;
      j--;
      k += s * a[j], s = 0;
    }
    cur ^= 1, i = j;
  }
  cout << k;
  return 0;
}
