Energy of photons of given frequency and number
Analogy: you have 5 bottles of coke 1 L each; what is the total volume?
The formula you shown $(E = hf)$ is derived for exactly one photon.
Now, since you have 50 billion of photons $(N = \pu{5.00e10}),$ guess what the total energy would be?

 $$E_\mathrm{tot} = Nhf = (\pu{5.00E10})(\pu{6.63E-34 J s})(\pu{1.00E9 s-1}) = \pu{3.32E-14 J}$$