Jane Street Interview Question

1 math question that is built upon as the interview progresses.