def lscan; gets.split.map(&:to_i); end a,b = lscan.map(&:to_r) aa = a # bb = (q/2)**2 + (q/2)**2 bb = b/2 puts [4,8,0][aa<=>bb]