#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16000000")
int main() {
  int n, a[120] = {};
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i < n; ++i)
    for (int j = i + 1; j <= n; ++j)
      if (a[i] > a[j]) swap(a[i], a[j]);
  int n1 = 350, n2 = 360, s = 0, sh = 0, sum = 0;
  int k = 1;
  while (a[k] <= n1) {
    n1 -= a[k];
    s++;
    k++;
    if (k > n) break;
  }
  a[k] -= n1;
  if (k <= n)
    while (a[k] + sum <= n2) {
      s++;
      sh += a[k] + sum;
      sum += a[k];
      k++;
      if (k > n) break;
    }
  cout << s << ' ' << sh;
}
