Surah 2, Verse 196

Perform the pilgrimage and holy visit (´Umra, to Makkah) in the service of God. But if you are prevented, send an offering which you can afford as sacrifice, and do not shave your heads until the offering has reached the place of sacrifice. But if you are sick or have ailment of the scalp (preventing the shaving of hair), then offer expiation by fasting or else giving alms or a sacrificial offering. When you have security, then those of you who wish to perform the holy visit along with the pilgrimage, should make a sacrifice according to their means. But he who has nothing, should fast for three days during the pilgrimage and seven on return, completing ten. This applies to him whose family does not live near the Holy Mosque. Have fear of God, and remember that God is severe in punishment.

— Quran 2:196

Quote from Quran 2:196