http://stackoverflow.com/questions/11720656/modulo-operation-with-negative-numbers
이거 보시면 될듯