Protection of implanted pacemakers from excessive electrical energy of D.C. shock