Start w/ (0,1,x,y) & apply the map (a,b,c,d)->(|a-b|,|b-c|,|c-d|,|d-a|) until (0,0,0,0) reached.  # of iterations?