solve for r: (p+3r)/6