#include <bits/stdc++.h>
using namespace std;
int v[92];
int main() {
  int k = 0;
  int k2 = 0;
  int t;
  cin >> t;
  int a;
  while (t--) {
    cin >> a;
    v[a] = 1;
  }
  for (int i = 1; i <= 90; i++) {
    k2++;
    if (v[i] == 0) {
      k++;
    } else
      k = 0;
    if (k >= 15) {
      break;
    }
  }
  cout << k2 << endl;
}
