As you hit the beach this Fourth of July weekend, remember to be mindful of sharks.
The fatalities took place in California, Hawaii and Maine.
The majority of the unprovoked attacks -- 16 -- occurred in Florida.
Here are some tips for how to stay safe, according to former Green Beret and survival expert Terry Schappert.
Editor's note: This article was initially published in 2015 and has been updated
If you see a shark, don't thrash or scream, Schappert told ABC News in 2015. Just turn around, get out of the water and tell everyone else to get out, he said.
Sharks pick up vibrations and smells, but they can't see you most of the time, Schappert said.
"The more you flail around ... [the sharks] are very attracted to that," he added.
Have a plan
Every beachgoer should have an evacuation plan, which includes knowing where the closest hospital is, Schappert said.
"Just think in your head, what would happen ... if someone you love just got bit? What now?" he said. "Don't be paranoid, but have a procedure. Think about how you'd get out of the water, then think about ... the chain of what would happen next."
"Try not to freak out," Schappert added. "But know it's a possibility."
Most shark bites are on the limbs, according to Schappert, and when a shark's mouth hits a swimmer's arm or leg, "it's bound to sever an artery."
"Shark bites are not smooth -- they're jagged -- which makes the wound worse," he said. And the more jagged the wound, the more it will bleed, so it's important to know first-aid.
"The best thing you can do for that person is to stop the bleeding," Schappert said, which, if the victim is bit on a limb, means applying a tourniquet.
Schappert took ABC News' chief national correspondent Matt Gutman swimming in waters teeming with sharks near the Bahamas in 2014.
To properly learn how to fend off sharks, Gutman pulled on 15 pounds of chain mail armor, and then put clothes on top to simulate people finding themselves in such waters after a plane or a boat crash.
Gutman and Schappert then did what experts say not to do: flapping around in waters where sharks were feeding.
While they were in the water, Schappert's advice to Gutman was to:
Slow down your movements
Fast movements give off the signal of prey, he said. Also conserving energy is key to survival in the above scenario.
If there are two people in the water, Schappert recommended treading water back to back to limit the spheres of control by half, to 180 degrees each.
If the sharks begin attacking, fight them off, Schappert said.
He recommended striking the sharks using quick, downward punching motions.
"All you can do is fight and let them know, 'I am not going down easy,'" Schappert told Gutman.