Intel Corporation interview question

Using box that gives 4 when its 7, and vice versa.