A = P( 1+r /n) nt
P = Principal
A = Amount payable
r= annual rate
t= time in years
n= Number of times compounded in a year
Assuming it is compounded once in a year n= 1`
A = P( 1+r /n) nt = 50000 = P ( 1+ 4.5/100)18
Gives P = $22640
The amount may become less if compounding is done monthly or daily basis