Sum of nodes(binary tree)

How to take input in the given ques

Hi @shubham.gupta29062002 refer