It begins in Keelung at the intersection of Xiao 2nd Road and Zhong 4th Road and ends in Kaohsiung at the intersection of Zhongshan 4th Road and Yugang Road, giving it a total length of 374 kilometers .