Assuming the M is molarity, molarity is equal to mols/volume in liters.
So it would be 50M NaCl = X mols/ 1.0L
50M * 1.0L = X mols
X = 50
50 Mols of NaCl
Now that you have mols, you can then convert mols to grams by doing 50mols NaCl * (58.44 g NaCl/ 1 mol NaCl)
= 2922 grams of NaCl