A man has n number of apples. If he eats a percentage p of the apples (if apples are available), his children will share the remainder of the apples. Create a function to determine the number of whole apples his children got. If his children did not get any apples, return -1.
getNumberOfApples(10, "90%") ➞ 1
getNumberOfApples(25, "10%") ➞ 22
getNumberOfApples(0, "10%") ➞ -1 p will always be given.