#include <bits/stdc++.h>
using namespace std;
int In[307], cons[307];
int main() {
  int N, i, ans, res;
  cin >> N;
  for (i = (1); i <= (N); i++) cin >> In[i];
  sort(In + 1, In + N + 1);
  for (i = (1); i <= (N); i++) cons[i] = cons[i - 1] + In[i];
  i = 0;
  while (cons[i] <= 350 && i <= N) i++;
  ans = i - 1;
  res = 0;
  while (cons[i] <= 710 && i <= N) {
    ans++;
    res += (cons[i] - 350);
    i++;
  }
  cout << ans << " " << res << endl;
  return 0;
}
