def main():
	initialValue = float(input('Please enter a starting amount: '))
	interestRate = float(input('Please enter an interest rate in percent: '))
	interestRate = interestRate / 100
	cost = float(input('How much does your item cost?: '))

	amountOfMoney = initialValue

	year = 0
	while amountOfMoney < cost:
		amountOfMoney = amountOfMoney + (amountOfMoney * interestRate)
		year = year + 1
	
	print('It took you',year,'years to save up £',amountOfMoney,
	'which is greater than or equal to the £',cost,'you needed')
	
main()
