Runtime error python.it takes less than 0.03s to execute but in codechef 5s

begin_time = datetime.datetime.now()

num = int(input())
i=0
s=0
while i<num:
i=i+1
s=s+i
print(s)