Work leave

If for example I've worked for a company and after 5 years I want to cancel contract and go back to my country, what formula does the company follow to give me the retirement package money.
Thank you

Search these forums for "End of service benefits" or "Indemnity".  I have personally commented and explained this topic dozens of times already.  So do your research before asking the same question again.