#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:100000000")
int mas[111];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &mas[i]);
  int cur = -350;
  sort(mas, mas + n);
  int cnt = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    cur += mas[i];
    if (cur <= 360) {
      cnt++;
      ans += max(0, cur);
    }
  }
  printf("%d %d\n", cnt, ans);
  return 0;
}
