Program hoc24;
var n: integer;
t: longint;
begin
write('Nhap so KW da su dung : '); readln(n);
if n=0 then write('So tien phai tra trong thang la :',0,'$') else
if n>0 then
begin
if n<=100 then t:=5*n else t:=100*5;
if (n>100) and (n<151) then t:=t+7*(n-100)
else if n>150 then t:=t+7*50;
if (n>150) and (n<201) then t:=t+10*(n-150)
else if n>200 then t:=t+10*50;
if (n>200) and (n<301) then t:=t+15*(n-200)
else if n>300 then t:=t+15*100;
if n>300 then t:=t+20*(n-300);
end else write('So KW da su dung nhap khong hop le');
write('So tien phai tra trong thang la : ',t,'$');
readln
end.