First Download ChainFire's AUTO root zip file.
If you have got a zip file then upzip the downloaded file. You'll get a .md5
Then switch off you device. Once you have switched off your device then press vol down+home button. And keep them pressed. Keeping them pressed push power button along with the presses two button. This will get into download mode.
Now plug in you device to pc & run odin as administrator. If you see a COM something shining blue. Then pc has recognized your device.
If not then download kies ( remember kies not kies 3) and install samsung driver support software i.e.
kies. Now, This tutorial is not about teaching you how to root the device. Its about providing you the zip file for auto root.
Files to download:
1) auto root file - http://download.chainfire.eu/402/CF-Root/CF-Auto-Root/CF-Auto-Root-k3g-k3gxx-smg900h.zip
2) odin v..3.09 - You can google this thing and download
3) Kies drivers- Google them as well.
If you are new to rooting device. watch a youtube video on how to root s5. There you just need to change the root file. Whole process is exactly same for all models. Its just the files that differs.