Calculating orbital period of the Earth and the mass of the Sun