added pre-solution for promblem 47