Definition: Given a math word problem, answer the following question. You might need to apply addition or subtraction mathematical operators on the numbers embedded in the text to answer the question and then only report the final numerical answer.
Input: jennifer has an 87 cm long ribbon . she uses 24 cm of the ribbon to tie a present for her friend and 45 cm of the ribbon to make a bow . how much of the ribbon is left in the end ?
Output:
18