PlayStation interview question

Write a code to find n.