Binary tree build using recursion

sir why we are cin>>d; at the starting of recursion
in sir vedio

first we take d and then decide what to do
if it is -1 then return -1 otherwise call for left and right

so it should be taken at starting

according to you where should we take it??