+ Monkey and Banana

A question from colleague, see:

http://acm.hdu.edu.cn/showproblem.php?pid=1069&PHPSESSID=e9h33nbhg8vmmrnm38p0uiee00