Credit for this problem goes to Emily Berger. Thanks!

Number trees

Solution