This should be:

    int offset = 1 + (a | b | c | d);