```go
package main
import (
"fmt"
)
func main() {
var n, m int64
if _, err := fmt.Scan(&n, &m); err != nil {
return
}
var ans int64 = 0
S := n + 1
for x := m + 1; x <= n-m; x++ {
M := 3*x*(S-x) - 1
LA := S - x + m + 1
RA := S - x + n - m
LB := x + m + 1
RB := x + n - m
Bmax := M / LA
for A := LA; A <= RA; A++ {
for A*Bmax > M {
Bmax--
}
if Bmax < LB {
break
}
limit := Bmax
if limit > RB {
limit = RB
}
ans += limit - LB + 1
}
}
fmt.Println(ans * 3)
}
```