NOTE: I am not a python expert, so there could be some obvious bugs in this simple piece of code. As always use at your own risk.
print "Input the first number"
print "Input the next number to be multiplied with %d" %a
if a & 0x1:
res = res + b
a = a >> 1
b = b << 1
print "The result is %d\n" %res