The top surface area is 0.3 * 0.5 = 0.15m2, and the back surface area is 0.9 * 0.3 = 0.27m2..
The two small doors above are almost one third as high as the whole cabinet: 0.9/3, so the height of the cabinet door should be: 0.3 meters.
The area of cupboard door is 0.3*0.3=0.09 m2, so the total surface to be painted should be 0.9+0.15+0.27+0.09 =1.14m2.
According to 1 m2, use 5g of paint:1.14 * 5 = 5.7g of paint.