The diagonal of a rectangular garden measures 1114 m while its width measures 634 m. Calculate the perimeter of the garden.