import times, strutils, sequtils, math, algorithm, tables, sets, lists, intsets import critbits, future, strformat, deques template `max=`(x,y) = x = max(x,y) template `min=`(x,y) = x = min(x,y) template `mod=`(x,y) = x = x mod y template scan2 = (scan(), scan()) template scan3 = (scan(), scan()) let read* = iterator: string {.closure.} = while true: (for s in stdin.readLine.split: yield s) proc scan(): int = read().parseInt proc scanf(): float = read().parseFloat proc toInt(c:char): int = return int(c) - int('0') proc solve():int= var n = scan() k = scan() proc getCount(v:int):int= return max(0,min(n,v-1)-max(v-n,1)+1) for x in 1..int.high: if x^2 > k:break if k.mod(x)==0: var y = k.div(x) # x <= y if x < y: result+=getcount(x)*getCount(y)*2 else: result+=getcount(x)*getCount(y) echo solve()