Joshua had a packet of stickers. He gave 50 stickers to Timothy. He then bought 125 more stickers. After that he gave half the number of stickers he had to his sister. He was finally left with 78 stickers. How many stickers had Joshua at first?

(x - 50 + 125)/2 = 78

Now solve for x.