#include <bits/stdc++.h>
using namespace std;
int n;
int a[105];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  int start = -350;
  int tasks = 0;
  int penalty = 0;
  for (int i = 0; i < n; ++i) {
    if (start + a[i] <= 0)
      ++tasks;
    else {
      if (start + a[i] > 360) break;
      ++tasks;
      penalty += start + a[i];
    }
    start += a[i];
  }
  printf("%d %d\n", tasks, penalty);
  return 0;
}
