package main import ( "fmt" "math" ) func main() { var n, l int _, _ = fmt.Scan(&n, &l) cnt := 0 p := make([]int, 0) for i := 2; ; i++ { // 素数かのチェック isP := true sq := math.Sqrt(float64(i)) for _, a := range p { if float64(a) > sq { break } if i%a == 0 { isP = false break } } if !isP { continue } p = append(p, i) max := (n - 1) * i if max > l { break } cnt += l - max + 1 } fmt.Println(cnt) }