Microsoft Interview Question

You are given two integers n and m. Create some data structure that has n elements, then eliminate every mth element until you have only one remaining. Return the index of that element.