function parity = BR_parity(L1,L2,L3)
% BR_parity - parity of literals
% On input:
%     L1 (int): literal 1
%     L2 (int): literal 2
%     L3 (int): literal 3
% On output:
%     parity (int): parity of literals
% Call:
%     p = BR_parity(1,2,3);
% Author:
%     T. Henderson
%     UU
%     Summer 2018
%

if L3==0
    parity = 2*(L1>0) + (L2>0);
else
    parity = 4*(L1>0) + 2*(L2>0) + (L3>0);
end
