n,k=map(int,input().split()) print((n+1)*n/2*k/6)