modify maximum flow, 0 ~ n-1