First of all, the inputs do not come separated by spaces, but in new lines. So inp.split(" ") will not separate the 3/2/1 scores into final.
You should follow the instruction you shared through the linked PDF.
for i in range(1, ((int(final) - 1) + 2)):
result = result + (final[len(final) - 1])
is weird as well.
Here's what you should do: