#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 2147483647;
const long double PI = 3.14159265358979323846;
int main() {
  int N;
  cin >> N;
  int a[N];
  for (int i = 0; i < (N); ++i) cin >> a[i];
  long long int ans = 1000;
  int i = 0;
  while (i < N) {
    int k = i;
    while (1) {
      if (k == N || a[i] < a[k]) {
        break;
      }
      ++k;
    }
    bool flag = true;
    for (int j = i; j < k; ++j) {
      if (a[i] > a[j]) {
        flag = false;
      }
    }
    if (k == N) {
      flag = false;
    }
    if (flag) {
      int stock = ans / a[i];
      ans -= a[i] * stock;
      i = k;
      ans += a[i] * stock;
    } else {
      ++i;
    }
  }
  cout << ans << endl;
  return 0;
}
