#include <bits/stdc++.h>
int quick_sort(int *array, int low, int high) {
  int pivot_point, pivot_item, i, j, temp;
  if (high <= low) {
    return 1;
  }
  pivot_item = array[low];
  j = low;
  for (i = low + 1; i <= high; i++) {
    if (array[i] >= pivot_item) {
      continue;
    }
    j++;
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
  }
  pivot_point = j;
  temp = array[low];
  array[low] = array[pivot_point];
  array[pivot_point] = temp;
  quick_sort(array, low, pivot_point - 1);
  quick_sort(array, pivot_point + 1, high);
  return 1;
}
int main() {
  int n, pen = 0, temp = 0;
  int list[100] = {0};
  bool a[100] = {0};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &list[i]);
  }
  quick_sort(list, 0, n - 1);
  for (int i = 0; i < n; i++) {
    temp = temp + list[i];
    if (temp > 710)
      break;
    else {
      a[i] = true;
      if (temp > 350) pen = pen + temp - 350;
    }
  }
  int count = 0;
  for (int j = 0; j < n; j++) {
    if (a[j] == true) count++;
  }
  printf("%d %d", count, pen);
}
