#include <bits/stdc++.h>
int main(void) {
  int num = 0;
  int a[num];
  int result = 0;
  int resultmin = 0;
  int red = 0;
  int blue = 0;
  int yellow = 0;
  int green = 0;
  int grly = 0;
  int softblue = 0;
  int orange = 0;
  int blown = 0;
  scanf("%d", &num);
  for (int i = 0; i < num; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 399) {
      if (grly == 1) {
      } else {
        grly = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 799) {
      if (blown == 1) {
      } else {
        blown = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 1199) {
      if (green == 1) {
      } else {
        green = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 1599) {
      if (softblue == 1) {
      } else {
        softblue = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 1999) {
      if (blue == 1) {
      } else {
        blue = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 2399) {
      if (yellow == 1) {
      } else {
        yellow = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 2799) {
      if (orange == 1) {
      } else {
        orange = 1;
        result++;
        resultmin++;
      }
    } else if (a[i] < 3199) {
      if (red == 1) {
      } else {
        red = 1;
        result++;
        resultmin++;
      }
    } else {
      result++;
    }
  }
  printf("%d", resultmin, result);
}
