The Carnival of Rio de Janeiro Brazil is a festival celebrated annually , the week that marks the beginning of Lent (of the Catholic Church ) since the year 1840, a tradition in which people from all over the world gather to dance polkas and waltzes amid great parades of floats and costumes . During five days .