python3解题(不调用第三方库函数):HJ7 取近似值

num = float(input())
# print((round(num)))#注意round有小坑,并不一定都是四舍五入
a,b = divmod(num,1)
a = int(a)
if b>=0.5:
    print(a+1)
else:
    print(a)