Pirates and Gems Puzzle

Puzzle of the Day 2050 : Pirates and the Gems Riddle

Puzzle 2050 thinkwitty.com - Pirates and The Gems Riddle

Seven pirates attacked the British ship and looted some rare gems from them. They decided to rest for some time and then divide the gems later. While everyone was resting, two pirates wake up and planned to divide gems equally between the two. When they divided gems equally, one gem was left. So, they decided to wake up the third pirate and divide among three, but alas again one gem was left. They decide to wake up the fourth pirate to divide the gems and again one gem was left. The same happened again with the fifth and sixth. Finally, they woke up the 7th pirate and this time the gems were divided equally.

How many minimum gems did they steal in total ?