Snowflake Interview Question

Find the Nth magical number