Solve for r A=p+prt