<?php
$rates = array(2,2,3,8,3,5,1,7,3,6,2,5,7,3);
$rates_count = count($rates); $avg_rate = round($rates_sum / $rates_count);
echo "There was total {$rates_count} points, their sum is {$rates_sum}\nAverage rating is {$avg_rate}";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokcmF0ZXMgPSBhcnJheSgyLDIsMyw4LDMsNSwxLDcsMyw2LDIsNSw3LDMpOwoKJHJhdGVzX3N1bSA9IGFycmF5X3N1bSgkcmF0ZXMpOwokcmF0ZXNfY291bnQgPSBjb3VudCgkcmF0ZXMpOwokYXZnX3JhdGUgPSByb3VuZCgkcmF0ZXNfc3VtIC8gJHJhdGVzX2NvdW50KTsKCmVjaG8gIlRoZXJlIHdhcyB0b3RhbCB7JHJhdGVzX2NvdW50fSBwb2ludHMsIHRoZWlyIHN1bSBpcyB7JHJhdGVzX3N1bX1cbkF2ZXJhZ2UgcmF0aW5nIGlzIHskYXZnX3JhdGV9Ijs=