import std; void main(){ auto input = readln.split.to!(int[]); auto x = input[0]; auto y = input[1]; if((x + 4) % 12 == y){ writeln((x + 8) % 12); }else{ writeln((x + 4) % 12); } }