Microsoft Excel – Sum only if it is not blank

I am trying to put a formula that adds 3 cells, but if they are blank I do not want to add them. if there are no values ​​in the cell, I still get "0" as a result, but I just want to have a "0" if the value of the cells is really "0" and is not blank. As an example I used this formula:
= IF (COUNTA (J6, J7, J8) <3, "", SUM (J6, J7, J8))
but it does not give me a result until I complete the 3 values, and I want to add it even if it only has 2 values.

Any advice?