node mmm(x: int) returns (o2: int)
  var last m: int; o: int;
  let
    automaton
      state I
        do m = 1; o = last m + 2 until (o = 1) then J
      state J
        do m = last m + 1; o = 0
    end;
    o2 = 1 -> pre o
  tel
