InputNumber = eval(input())
WhichOneInTheLine = InputNumber % 4 if InputNumber % 4 != 0 else 4
def HowManyCompleteLevels(GivenNumber):
i = 1
while (i + 2) * (i + 1) / 2< GivenNumber:
i += 1
return i
def HowManyNumbersInCompleteLevels():
return (HowManyCompleteLevels(InputNumber / 4) + 1) * HowManyCompleteLevels(InputNumber / 4) / 2
def HowManyLinesLeft():
return int(InputNumber // 4 - HowManyNumbersInCompleteLevels() + 1) if WhichOneInTheLine != 4 else int(InputNumber // 4 - HowManyNumbersInCompleteLevels())
def WhatFruitItIs(GetNumber):
if GetNumber * 4 - HowManyCompleteLevels(InputNumber / 4) <= 1:
return "Pen"
elif GetNumber * 4 - 2 * HowManyCompleteLevels(InputNumber / 4) <= 2:
return "Pineapple"
elif GetNumber * 4 - 3 * HowManyCompleteLevels(InputNumber / 4) <= 3:
return "Apple"
else:
return "Pineapple pen"
def main():
print(WhatFruitItIs(HowManyLinesLeft()))
main()