The external angles of a 20-gon must add up to 360, because, if you imagine walking round its perimeter, you must make one revolution of 360 degrees in total as you turn each corner. So the exterior angles add up to 360 and for a regular figure each angle must be 360/20=18 degrees. The interior angles are complementary so the interior angles are 180-18=162 degrees. The total of the interior angles is 20*162=3240 degrees.
Formula for n-gon: exterior angle=360/n; interior angle= 180-360/n; total of exterior angles=n(180-360/n)=180n-360)=180(n-2) degrees or 2(n-2) right angles. Put n=20 and we get 36 right angles or 3240 degrees. In radians the formula is (pi)(n-2). Note that the total is the same for an irregular n-gon.