Added intermediate variable for 2*a