Using Havel Hakimi Theorem
$ 7,6,5,4,3,2,1,x $
${\color{Red} \not{7} },5,4,3,2,1,0,(x-1) $
${\color{Red} \not{7} },{\color{Red} \not{5} },3,2,1,0,0,(x-2) $
${\color{Red} \not{7} } ,{\color{Red} \not{5} } ,{\color{Red} \not{3} } ,1,1,0,0,(x-3) $
${\color{Red} \not{7} } ,{\color{Red} \not{5} } ,{\color{Red} \not{3} },0,(x-4)$
$ x-4 =0 $
$\Rightarrow x=4.$