Does my Java code for the Josephus problem work? : Here's some Java code I made for homework on the Josephus problem.
I believe it doesn't work, but I want to make sure.  If it's broken, I want to see if it can be fixed. If it can't be fixed because it is flawed by design, then please tell me so. Thank you.
```
public Int Josephus problem(int num4){
    int reducer = 1;
    int c = 1;
    while (num4 > reducer+1){
        num4 -= reducer;
        reducer += c++;
    }
    num4 = 1 + (num4-1)*2;
    return num4;
}

```

I want to use this because it is for homework and so original work is worth more than better code. That's why I don't want to use the Bit shifting solution. I didn't think of it myself.