How many ohm resistor need for GPIO input?

I’ve just done very simple GPIO input output C program with my Rock Pi S.
I used 3.3v pin and a gpio pin with 120ohm resistor.
It worked but I want to make sure cause I already ruined one GPIO pin.
How many ohm resistor should I put between 3.3v pin and input GPIO pin??
What about 5v??

And here is very simple and easy GPIO C code. It help me a lot to understand GPIO programming.