PlayStation Interview Question

Write a code to find n.