How much RAM you need depends entirely on how you want to play on your rented Minecraft server, but
roughly you can calculate your RAM needs like this:
For the current version of Minecraft to run smoothly, we recommend about 1.5 GB of RAM.
For additional mods, we recommend up to 1 GB of RAM and in the case of very large modpacks 2 - 3 GB of RAM.
Depending on the number of players, you should add another GB of RAM for every 5 players.