#include <bits/stdc++.h>
using namespace std;
int a[109];
int main() {
  int n;
  cin >> n;
  for (typeof(0) i = (0); i < (n); i++) cin >> a[i];
  int tott = 350 + 360;
  sort(a, a + n);
  int tmp = 0, ans1 = 0, ans2 = 0, cur = 0;
  for (typeof(0) i = (0); i < (n); i++)
    if (tmp + a[i] <= tott) ans1++, tmp += a[i];
  for (typeof(0) i = (0); i < (n); i++) {
    cur += a[i];
    if (cur > tott) break;
    if (cur < 350)
      continue;
    else
      ans2 += (cur - 350);
  }
  cout << ans1 << " " << ans2 << "\n";
  return 0;
}
