Using a Tanning Bed once or twice is not gonna give you cancer or Melanoma however if you constantly use tanning bed especially before age 35 then you have a higher chance of developing cancer such as Melanoma.
The more often you use the tanning bed the higher your chances of developing cancer and it's best to never use a tanning bed at all.
In order for your body to get a tan from the tanning bed the UV Rays from the tanning bed which are very dangerous ultraviolet (UV) rays have to pierce your skin and start to mess with your DNA.
So there really is no safe amount of tanning and it can lead to cancer if done enough.