import sys
from dataclasses import dataclass, field
from collections import namedtuple

DEBUG = True
debug_padding = 24

def debug_print(printname, *args):
    if DEBUG:
        print(f"{'DEBUG::'+printname:<{debug_padding}}", *args)




print("Parsing Input:")
print("")
print("===================================\n");

FILENAME = "/home/icaema/Public/advent-of-code/day-06/data/p01data.txt"
f = open(FILENAME, "r")

#for line in sys.stdin:
lines = f.readlines()
#p_time = lines[0][5:].replace(' ', '').split()
time = int(lines[0][5:].replace(' ', ''))
farthest = int(lines[1][9:].replace(' ', ''))
debug_print("input", f"ptime: {time}, p_farthest: {farthest}")

#debug_print("races", races)


print("")
print(" Proccessing:")
print("===================================\n");
# Insert Processing Code

result = 1

winning_sleeptimes = 1
debug_print("time&d", time, farthest)
winning_sleeptimes = len([1 for slt in range(time) if (time-slt)*slt > farthest])
print(winning_sleeptimes)
result *= winning_sleeptimes

#winning_sleeptimes = 0
#less_count = 0
#sleepTime = 1
#while (time - sleepTime)*sleepTime < farthest:
#    less_count += 1
#    sleepTime += 1
#result *= time - less_count*2 -1



print("")
print(" Calculate Answer:")
print("===================================\n");






print("")
print(" Answer:")
print("===================================\n");
print(f"Answer: \n{result}");