Energy = power x time
Power = voltage x current.
Energy = voltage x current x time
Energy = 40 x 0.5 x 60 x 2
→ 2,400j