Jane had R Beanie Babies. She gave 8 of them to her friend. Later her grandma bought her 5 more Beanie Babies than she had in the beginning. How many Beanie Babies did Jane have in the beginning, if now she has 27 of them?