Solution for right triangle count for MIA48.