>>19641358i assumed a cube can be formed from other smaller cubes so it's kind of like that
Small cubes: 3*7+3*6+3*4
Bigger cubes:
4 cubes a bigger cube side: 2*3+2*2 (I multiplied by 2 because there are 3 rows and the middle row made of small cubes can be shared with the left or the right row to make bigger cubes)
Biggest cubes:
Only 1 (9 smaller cubes on a side cube)
Total: smaller cubes 51 + bigger cubes 10 + biggest cube 1 = 72