In first iteration, parent will spawn a child c1, both will have x=3 and execute printf statement 3 times.
In second iteration, parent and child c1 will spawn 2 children c2 and c3, both children will have x=2 and execute printf statement 2 times.
In third iteration, parent and children c1, c2, c3 will spawn 4 children c4, c5, c6 and c7, all 4 children will have x=1 and execute printf statement only once.
Loop terminates in all processes.
Number of times print statement is executed is $3*2 + 2*2 + 4*1 = 14$
Answer - 14