A student moves \[\sqrt{2\,}x\,\text{km}\] East from his residence and then moves x km North. He then goes x km North-East and finally he takes a turn of \[90{}^\circ \] towards right and moves a distance .ic km and reaches his school. What is the shortest distance of the school from his residence?