Started studying about complexity, I'm struggling with this one:

```
void what(int n) {
    int i;
    for (i = 1; i <= n; i++) {
        int x = n;
        while (x > 0)
            x -= i;
    }
}

```

Well, the first for loop is clearly `O(n)`. The first iteration is `O(n)`, second one is `O(n/2)`.. and like that `log(n)` times I guess?
Which means **`O(n) * O(log(n)) = O(n * log(n)) complexity`**. Did I get this right?

Edit: (not a duplicate) I know what Big O is. I've asked the correct evaluation in a specific case.