#include <bits/stdc++.h>
#pragma GCC optimize "trapv"
const int inf1 = 1e9;
const long long int inf2 = 1e18;
const int N = 100000;
using namespace std;
int dirs[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
int a[2 * N + 10];
int solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    mp[a[i]]++;
  }
  int c1 = 0, c2 = 0;
  for (int i = 1; i <= n;) {
    if (mp.count(i)) {
      c1++;
      i = i + 3;
    } else {
      i++;
    }
  }
  set<int> st;
  for (int i = 1; i <= n;) {
    if (st.find(i) != st.end()) {
      i++;
      continue;
    }
    if (mp.count(i) == 0 || mp[i] == 0) {
      i++;
      continue;
    }
    int j = i;
    int s = 0;
    while (j <= n && mp.count(j)) s += mp[j], j++;
    int len = j - i;
    if (s == len) {
      c2 += len;
      i = j;
      continue;
    } else {
      c2 += len;
      if (st.find((i - 1)) != st.end() == 0) s--, c2++;
      if (s > len) {
        if (st.find((j)) != st.end() == 0) c2++, st.insert(j);
      }
      i = j;
    }
  }
  cout << c1 << " " << c2 << "\n";
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
