let
x------->
total amount of marbles at the beginning
we know that
1) He gave ½ of his marbles plus 1 to Felix
(1/2)*x+1=(x+2)/2 (Felix's marbles)
remaining=x-[(x+2)/2]-----> [2x-x-2]/2------> (x-2)/2
2)½ of the remaining marbles plus 1 to Ces
(1/2)*[(x-2)/2]+1=[(x-2)/4]+1-----> (x+2)/4 (Ce's marbles)
remaining=[(x-2)/2]-[(x+2)/4]-----> [2x-4-x-2]/4------> (x-6)/4
3) ½ of the last remaining marbles plus 1 to Pedro
(1/2)*[ (x-6)/4]+1=[(x-6)/8)+1------> (x+2)/8 (Pedro's marbles)
remaining=[(x-6)/4]-[(x+2)/8]------> [2x-12-x-2]/8-----> (x-14)/8
4)If Lito had 1 marble left for himself
so
the last remaining is equal to 1
(x-14)/8=1-----> x-14=8------> x=22 marbles
Verify
(x+2)/2 (Felix's marbles)------> (22+2)/2=12
(x+2)/4 (Ce's marbles)------> (22+2)/4=6
(x+2)/8 (Pedro's marbles)---> (22+2)/8=3
Lito's marbles------------------> 1
total=12+6+3+1=22--------> is ok
therefore
the answer is
the total amount of marbles at the beginning was 22