x = nr initial de paini
dim = x/2+4
pranz = [x-(x/2+4)]/2
seara = x-{[x-(x/2+4)]/2}/2+6
ramase = 3
(x/2+4)+[x-(x/2+4)]/2+{[x-(x/2+4)]/2}/2+6 = 3
2(x/2+4)+x-(x/2+4)+[x-(x/2+4)]/2+12=6
4(x/2+4)+2[x-(x/2+4)]+x-(x/2+4)+24=12
2x+8+2x -x-8+x-x/2 -4+24=12
4x-x/2+20=2
8x-x+40=4
7x=36
x=36/7
E o mica gresala de calcul. x trebuie sa fie numar natural