yeah if course its a nice logic buddy
see for one 3 i/p nand gate wants 3 2i/p nand gates----->3*1+0
see for one 4 i/p nand gate wants 5 2i/p nand gates----->4*1+1
see for one 5 i/p nand gate wants 7 2i/p nand gates----->5*1+2
see for one 6 i/p nand gate wants 3 2i/p nand gates----->6*1+3
see for one 7 i/p nand gate wants 11 2i/p nand gates----->7*1+4