#!/usr/bin/perl -w

use v5.38;

my $t = join('', <> =~ /\d+/g);
my $d = join('', <> =~ /\d+/g);

my $n;
for my $t1 (1 .. $t-1) {
	my $d1 = ($t-$t1)*$t1;
	$n++ if $d1 > $d;
	# say "$t1 $n" if $t1 % 10_000 == 0;
}
say $n;
