Answer:
( l + 4) * ( w + 3 ) * ( h + 7)
let l represent the length, w represent the width, and h represent the height of your cub-shaped gift.
Though, if your gift is in the shape of a cube, that would mean all the sides are the same length.
( 2 + 4 ) * ( 2 + 3 ) * ( 2 + 7 )
6 * 5 * 9 = 270
(I haven't done geometry in awhile though, so this may be incorrect unless it actually makes sense.)