After reading your question and following your link I decided to learn awk. I believe this will solve your problem. 'p' is used as your constant.
Linux:
awk '{if(length($0)>0){p=0.5;print $1,int(substr($2,0,length($2)-1)*p)");"}}' filename
Windows:
awk "{if(length($0)>0){p=0.5;print $1,int(substr($2,0,length($2)-1)*p)\");\"}}" filename
Both versions have been tested.