#include <bits/stdc++.h>
using namespace std;
const int PI = 3.141592653589793238;
const long long inf64 = 1000000111111222222;
const int inf = 1000111222;
const int mod = 1000000007;
const int N = 100007;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int ar[N];
  for (int i = 0; i < n; i++) cin >> ar[i];
  int have = 1000;
  for (int i = 0; i < n; i++) {
    int shares = have / ar[i];
    int curr = have - shares * ar[i];
    int j = i + 1;
    while (j < n) {
      if (ar[j] == ar[j - 1]) {
        j++;
        continue;
      }
      if (ar[j] < ar[j - 1]) {
        break;
      } else {
        curr = shares * ar[j];
        j++;
      }
    }
    have = max(have, have + curr - shares * ar[i]);
    i = j;
  }
  cout << have << endl;
  return 0;
}
