The competent institution of Malta shall first calculate the amount of the theoretical benefit which would be payable if the insurance periods under the legislation of the Netherlands and Malta, totalized as provided for in Article 15 or 16, as required, taking into account periods in a third State with which both Contracting Parties have an Agreement on social security, had been paid or credited under the legislation of Malta alone. The theoretical benefit so calculated shall be pro-rated by the fraction that the total reckonable contributions paid or credited under the legislation of Malta bear to the number of contributions totalized under Article 15 or 16 as required.