#include<stdio.h> int main() { int a,b; int res=0; scanf("%d %d",&a,&b); res = ((a/2)*(b/3)+(a/3)*(b/2))*2; printf("%d",res); return 0; }