Anyone who plans to visit the Miracle Fruit Tree in the Royal Garden has to travel through Seven Gates in each of the Seven Curtain Walls surrounding the garden.
Each of these gates has a guard.
There is only one way in and out each of these curtain walls.
The Royal rule is Each of the guard will take half the number of fruits from anyone on the way out.
One fine day, a commoner negotiates a deal with each of the guard on the way in.
The deal is after sharing the split, will take back one from the guard.
After plucking 'MAGICNUMBER' number of fruits on the way out, Both the guard and the person honor the deal at each of the Seven gates.
At home the Person counts all the Miracle Fruits remaining.
The count is 'MAGICNUMBER'.
What is the 'MAGICNUMBER' ?