def calculateNewTotalAmount(money, interestRate):
	interestGained = money * interestRate;
	
	return money+ interestGained

def main():
	money = float(input('How much money do you have?: £'))
	numberOfYears = int(input('Please enter the number of years: '))
	interestRate = float(input('Please enter the interest rate: '))
	costOfBike = float(input('How much does the Bike cost?: '))

	count = 0

	while count != numberOfYears:
		money = calculateNewTotalAmount(money, interestRate)
		count = count + 1

	if money >= costOfBike:
		print('You can buy the bike!')
	else:
		print('You can\'t buy the bike.')
main()	
