#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
const int INF = 0x3f3f3f3f;
const double pi = acos(-1.0);
const double eps = 1e-9;
int a[maxn];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  int now = 10;
  int ans = 0;
  int anscnt = 0;
  bool flag = true;
  for (int i = 0; i < n; ++i) {
    if (flag) {
      now += a[i];
      if (now == 360) {
        anscnt += i + 1;
        flag = false;
      } else if (now > 360) {
        anscnt += i;
        if (now <= 720) {
          flag = false;
          anscnt++;
          ans += now - 360;
        } else
          break;
      }
    } else {
      now += a[i];
      if (now <= 720) {
        anscnt++;
        ans += now - 360;
      } else
        break;
    }
  }
  if (now <= 360) {
    anscnt = n;
    ans = 0;
  }
  cout << anscnt << " " << ans << "\n";
  return 0;
}
