#include <bits/stdc++.h>
using namespace std;
int arr[200200];
int ada[200200];
int carry[200200];
int done[200200];
int dp[200200];
map<int, int> mp, mpa;
int main() {
  int n, i, j, k, x, y, ans, curr, temp, m;
  int tc;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
    mpa[arr[i]]++;
    dp[i] = 1e9;
  }
  int sana = 0, chaeng = 0;
  dp[0] = 0;
  for (i = 1; i <= n; i++) {
    dp[i] = dp[i - 1];
    if (mp[i] > 0) dp[i]++;
    if (i > 1) {
      if (mp[i] > 0 && mp[i - 1] > 0) {
        dp[i] = min(dp[i], dp[i - 2] + 1);
      }
    }
    if (i > 2) {
      if (mp[i] > 0 && mp[i - 2] > 0) {
        dp[i] = min(dp[i], dp[i - 3] + 1);
      }
    }
  }
  sana = dp[n];
  for (i = 1; i <= n; i++) mp[i] = mpa[i];
  for (i = 1; i <= n; i++) {
    if (ada[i - 1] == 0 && mp[i] > 0) {
      mp[i]--;
      ada[i - 1] = 1;
    }
    if (ada[i + 1] == 0 &&
        ((mp[i] > 1 && ada[i] == 0) || (mp[i] > 0 && ada[i] == 1))) {
      mp[i]--;
      ada[i + 1] = 1;
    }
    if (ada[i] == 0 && mp[i] > 0) {
      ada[i] = 1;
    }
  }
  for (i = 0; i <= n + 1; i++) chaeng += ada[i];
  cout << sana << " " << chaeng << endl;
  return 0;
}
