Can be done backwards way..
Amount he had when he came into 5th store = $2 (since 1 dollar more than half is all he has)
Amount he had when he came into 4th store = (2+1)2 = 6 (as he spent $1 more than half in 4th store leaving $1 less than half for 5th store)
Amount he had when he came into 3th store = (6+1)2 = 14
Amount he had when he came into 2th store = (14+1)2 = 30
Amount he had when he came into 1th store = (30+1)2 = 62
Money he got from grandma = $ 62