import java.util.Arrays; import java.util.Scanner; public class length{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int wari = a / (b * 2); int dasi = wari * b; int ate = a / 2; if(ate == dasi){ System.out.println(dasi); }else{ System.out.println("0"); } sc.close(); } }