#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int dx[8] = {1, -1, 0, 0, -1, -1, 1, 1};
int dy[8] = {0, 0, -1, 1, -1, 1, -1, 1};
vector<pair<long long, long long>> adj[300010];
vector<long long> val(300010, -1), vis(300010, 0), dis(300010, -1);
int myrandom(int i) { return std::rand() % i; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> vis(200010, 0), v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    vis[v[i]] = 1;
  }
  vector<long long> dp(n + 10, 1ll << 60);
  dp[0] = 0;
  if (vis[1] == 1) {
    dp[1] = 1;
  } else {
    dp[1] = 0;
  }
  if (vis[2] == 1) {
    dp[2] = 1;
  } else {
    dp[2] = dp[1];
  }
  for (int i = 3; i <= n; i++) {
    if (vis[i] == 0) {
      dp[i] = dp[i - 1];
    } else {
      dp[i] = dp[i - 3] + 1;
    }
  }
  cout << dp[n] << " ";
  int cnt = 0;
  vis.assign(n + 3, 0);
  int i = 1;
  for (int i = 0; i < n; i++) {
    vis[v[i]]++;
  }
  while (i <= n) {
    if (vis[i] == 1) {
      if (vis[i - 1] == 0) {
        vis[i - 1] = 1;
        vis[i] = 0;
      }
    } else if (vis[i] == 2) {
      if (vis[i - 1] == 0) {
        vis[i - 1] = 1;
        vis[i] = 1;
      } else {
        vis[i + 1]++;
      }
    } else if (vis[i] > 2) {
      vis[i - 1]++;
      vis[i + 1]++;
    }
    i++;
  }
  for (int i = 0; i <= n + 1; i++) {
    if (vis[i]) cnt++;
  }
  cout << cnt << '\n';
}
