Another way to do it:

=if(c36=0,0,if(c37=0,0,if(c38=0,0,if(c39=0,0,roundup((c36/c37)+(c38/c39),0)))))