#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  int x;
  scanf("%d", &x);
  return x;
}
int nums[128];
int n;
inline int penalty(int ct) {
  if (ct <= 360) return 0;
  return ct - 360;
}
int solve(int take) {
  int ret = 0;
  int curr = 10;
  for (int i = 0, _n = (take); i < _n; ++i) {
    curr += nums[i];
    ret += penalty(curr);
  }
  return ret;
}
int main() {
  n = getint();
  for (int i = 0, _n = (n); i < _n; ++i) nums[i] = getint();
  sort(nums, nums + n);
  for (int i = (n), _b = (0); i >= _b; --i) {
    int sum = 10;
    for (int j = 0, _n = (i); j < _n; ++j) sum += nums[j];
    if (sum <= 720) {
      printf("%d %d\n", i, solve(i));
      break;
    }
  }
  return 0;
}
