Hard submission

STANDARD - 116,330   GOLD - 16,482