TnT/CodeNet4Repair huggingface dataset:
Problem:
Write a program which reads an integer $S$ [second] and converts it to $h:m:s$ where $h$, $m$, $s$ denote hours, minutes (less than 60) and seconds (less than 60) respectively.

Incorrect submission (verdict: Wrong Answer):
import math as m
def solve(s):


    print("suusii")
    
    hours = m.floor(s/3600)
    mod_hour = s%3600
    minutes = m.floor(mod_hour/60)
    seconds = mod_hour%60
    answer_format = "{0}:{1}:{2}".format(hours,minutes,seconds)
    print(answer_format)


def answer():
    s = int(input())
    solve(s)

if __name__ == '__main__':
    answer()


Fixed, accepted submission:
import math as m
def solve(s):



    
    hours = m.floor(s/3600)
    mod_hour = s%3600
    minutes = m.floor(mod_hour/60)
    seconds = mod_hour%60
    answer_format = "{0}:{1}:{2}".format(hours,minutes,seconds)
    print(answer_format)


def answer():
    s = int(input())
    solve(s)

if __name__ == '__main__':
    answer()
Problem:
Snuke is buying a bicycle. The bicycle of his choice does not come with a bell, so he has to buy one separately.  He has very high awareness of safety, and decides to buy two bells, one for each hand.  The store sells three kinds of bells for the price of a, b and c yen (the currency of Japan), respectively. Find the minimum total price of two different bells.

Incorrect submission (verdict: Wrong Answer):
a,b,c=map(int,input().split())
L=[a,b,c]
L.sort()
print(L[1]+L[2])

Fixed, accepted submission:
a,b,c=map(int,input().split())
L=[a,b,c]
L.sort()
print(L[1]+L[0])
Problem:
There are N empty boxes arranged in a row from left to right. The integer i is written on the i-th box from the left (1 \leq i \leq N).  For each of these boxes, Snuke can choose either to put a ball in it or to put nothing in it.  We say a set of choices to put a ball or not in the boxes is good when the following condition is satisfied:    * For every integer i between 1 and N (inclusive), the total number of balls contained in the boxes with multiples of i written on them is congruent to a_i modulo 2.  Does there exist a good set of choices? If the answer is yes, find one good set of choices.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

print(-1)

Fixed, accepted submission:
n = int(input())
a = [0]+list(map(int,input().split()))
N = [i for i in range(1,n+1)]
N.reverse()
ans = [0]*(n+1)
b = []

for i in N:
  if i*2 > n:
    if a[i] == 1:
      ans[i] = 1
  else:
    if a[i] == 1:
      if sum(ans[i::i])%2 == 0:
        ans[i] = 1
    else:
      if sum(ans[i::i])%2 == 1:
        ans[i] = 1
        
for i in range(1,n+1):
  if ans[i] == 1:
    b.append(i)

print(len(b))
print(*b)
Problem:
You are given three strings A, B and C. Check whether they form a _word chain_.  More formally, determine whether both of the following are true:    * The last character in A and the initial character in B are the same.   * The last character in B and the initial character in C are the same.  If both are true, print `YES`. Otherwise, print `NO`.

Incorrect submission (verdict: Wrong Answer):
a,b,c=input().split()
print('Yes' if a[-1:]==b[0:] and b[-1:]==c[0:] else 'No')

Fixed, accepted submission:
a,b,c=input().split()
print('YES' if a[-1:]==b[:1] and b[-1:]==c[:1] else 'NO')
Problem:
Some number of chocolate pieces were prepared for a training camp. The camp had N participants and lasted for D days. The i-th participant (1 \leq i \leq N) ate one chocolate piece on each of the following days in the camp: the 1-st day, the (A_i + 1)-th day, the (2A_i + 1)-th day, and so on. As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.  Find the number of chocolate pieces prepared at the beginning of the camp.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
D, X = map(int, input().split())
A = []
for _ in range(N):
  A.append(int(input()))

print(X + sum((D-1)//A[i] for i in range(N)))

Fixed, accepted submission:
N = int(input())
D, X = map(int, input().split())
A = []
for _ in range(N):
  A.append(int(input()))

print(X + sum((D-1)//A[i] + 1 for i in range(N)))
Problem:
Determine if we can choose K different integers between 1 and N (inclusive) so that no two of them differ by 1.

Incorrect submission (verdict: Wrong Answer):
N, K = list(map(int, input().split()))

re = 'No'
if (N+1)/2 >= K:
    re = 'Yes'

print(re)    

Fixed, accepted submission:
N, K = list(map(int, input().split()))

re = 'NO'
if (N+1)/2 >= K:
    re = 'YES'

print(re)
Problem:
You are given two integers A and B as the input. Output the value of A + B.  However, if A + B is 10 or greater, output `error` instead.

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())

'error' if a + b >= 10 else a + b

Fixed, accepted submission:
a, b = map(int, input().split())
 
print('error' if a + b >= 10 else a + b)
Problem:
There are a total of A + B cats and dogs. Among them, A are known to be cats, but the remaining B are not known to be either cats or dogs.  Determine if it is possible that there are exactly X cats among these A + B animals.

Incorrect submission (verdict: Wrong Answer):
import sys
A,B,X = map(int,input().split())

if A > X:
  print('No')
  sys.exit()
if A+B < X:
  print('No')
  sys.exit()
  
print('Yes')

Fixed, accepted submission:
import sys
A,B,X = map(int,input().split())

if A > X:
  print('NO')
  sys.exit()
if A+B < X:
  print('NO')
  sys.exit()
  
print('YES')
Problem:
There are N balls placed in a row. AtCoDeer the deer is painting each of these in one of the K colors of his paint cans. For aesthetic reasons, any two adjacent balls must be painted in different colors.  Find the number of the possible ways to paint the balls.

Incorrect submission (verdict: Wrong Answer):
n,k=map(int,input().split())
print(k*pow(k,n-1))

Fixed, accepted submission:
n,k=map(int,input().split())
print(k*pow(k-1,n-1))
Problem:
An _X -layered kagami mochi_ (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.  Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Incorrect submission (verdict: Wrong Answer):
i = 0
N = int(input())
list = [int(input()) for i in range(N)]
print("before sort",list)

list.sort(reverse = True)
print("after sort",list)

j = 0
cnt = 1
temp = list[0]

for j in range(N):
    if(temp > list[j]):
        temp = list[j]
        cnt = cnt + 1

print(cnt)


Fixed, accepted submission:
#i = 0
N = int(input())
list = [int(input()) for i in range(N)]

list.sort(reverse = True)

j = 0
cnt = 1
temp = list[0]

for j in range(N):
    if(temp > list[j]):
        temp = list[j]
        cnt = cnt + 1

print(cnt)
Problem:
The commonly used bills in Japan are 10000-yen, 5000-yen and 1000-yen bills. Below, the word "bill" refers to only these.  According to Aohashi, he received an otoshidama (New Year money gift) envelope from his grandfather that contained N bills for a total of Y yen, but he may be lying. Determine whether such a situation is possible, and if it is, find a possible set of bills contained in the envelope. Assume that his grandfather is rich enough, and the envelope was large enough.

Incorrect submission (verdict: Wrong Answer):
n, y = map(int, input().split())
for i in range(0, n+1):
    for j in range(0, n+1-i):
    	for k in range(0, n+1-i- j):
    		if 10000*i+5000*j+1000*k == y:
    			print(i, j, k)
    		else:
    			print(-1, -1, -1)

Fixed, accepted submission:
n, y = map(int, input().split())
ans = (-1, -1, -1)
for i in range(0, n+1):
    for j in range(0, n+1-i):
    	if 10000*i+5000*j+1000*(n-i-j) == y:
    		ans = (i, j, n-i-j)
print(ans[0], ans[1], ans[2])
Problem:
Two students of AtCoder Kindergarten are fighting over candy packs.  There are three candy packs, each of which contains a, b, and c candies, respectively.  Teacher Evi is trying to distribute the packs between the two students so that each student gets the same number of candies. Determine whether it is possible.  Note that Evi cannot take candies out of the packs, and the whole contents of each pack must be given to one of the students.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())
if a + b != c:
    if b + c != a:
        if c + a != b:
            print("No")
        else:
            pass
    else:
        pass
else:
    print("Yes")

Fixed, accepted submission:
a,b,c = map(int,input().split())
if a + b != c:
    if b + c != a:
        if c + a != b:
            print("No")
        else:
            print("Yes")
    else:
        print("Yes")
else:
    print("Yes")
Problem:
Write a program which calculates the area and perimeter of a given rectangle.

Incorrect submission (verdict: Wrong Answer):
p = input().split()
a = int(p[0])
b = int(p[1])
print(2*(a+b), a*b)


Fixed, accepted submission:
a,b = map(int, input().split())
print(a*b, 2*(a+b))
Problem:
Sitting in a station waiting room, Joisino is gazing at her train ticket.  The ticket is numbered with four digits A, B, C and D in this order, each between 0 and 9 (inclusive).  In the formula A op1 B op2 C op3 D = 7, replace each of the symbols op1, op2 and op3 with `+` or `-` so that the formula holds.  The given input guarantees that there is a solution. If there are multiple solutions, any of them will be accepted.

Incorrect submission (verdict: Wrong Answer):
n=[int(x) for x in input()]
for i in range((len(n)-1)**2):
    result=n[0]
    a=["-"]*len(n)
    for j in range(len(n)-1):
        if (i>>j &1)==1:
            result+=n[1]
            a[j]="+"
        else:
            result-=0
    if result==7:
        print(n[0],a[0],n[1],a[1],n[2],a[2],n[3],"=7")

Fixed, accepted submission:
n=[int(x) for x in input()]
for i in range(2**(len(n)-1)):
    s=n[0]
    result=[str(n[0])]
    for j in range(len(n)-1):
        if (i>>j &1)==1:
            s+=n[j+1]
            result.append("+")
        else:
            s-=n[j+1]
            result.append("-")
        result.append(str(n[j+1]))
    result.append("=7")
    if s==7:
        print("".join(result))
        break
Problem:
There is a rectangle in the xy-plane, with its lower left corner at (0, 0) and its upper right corner at (W, H). Each of its sides is parallel to the x-axis or y-axis. Initially, the whole region within the rectangle is painted white.  Snuke plotted N points into the rectangle. The coordinate of the i-th (1 ≦ i ≦ N) point was (x_i, y_i).  Then, he created an integer sequence a of length N, and for each 1 ≦ i ≦ N, he painted some region within the rectangle black, as follows:    * If a_i = 1, he painted the region satisfying x < x_i within the rectangle.   * If a_i = 2, he painted the region satisfying x > x_i within the rectangle.   * If a_i = 3, he painted the region satisfying y < y_i within the rectangle.   * If a_i = 4, he painted the region satisfying y > y_i within the rectangle.  Find the area of the white region within the rectangle after he finished painting.

Incorrect submission (verdict: Wrong Answer):
# -*- coding : utf-8 -*- 

w,h,n = map(int, input().split())


l,r,u,d = 0,w,h,0
for i in range(n) :
  x,y,a = map(int, input().split())
  if a == 1:
    l = min(l,x)
  elif a == 2:
    r = max(r,x)
  elif a == 3:
    d = min(d,y)
  elif a == 4:
    u = max(u,y)
  
S = max(0, u-d) * max(0,l-d)
print(int(S))

Fixed, accepted submission:
# -*- coding : utf-8 -*- 

w,h,n = map(int, input().split())


l,r,u,d = 0,w,h,0
for i in range(n) :
  x,y,a = map(int, input().split())
  if a == 1:
    l = max(l,x)
  elif a == 2:
    r = min(r,x)
  elif a == 3:
    d = max(d,y)
  elif a == 4:
    u = min(u,y)
  
S = max(0, u-d) * max(0,r-l)
print(int(S))
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
a=input().split()
b=0
for i in a:
  if i in ['5','7']:
    b=b+int(i)
    re='Yes'
  else:
    b=b+int(i)
    re='No'
    break
    
if b==17 and re!='No':
  print('Yes')
else:
  print('No')

Fixed, accepted submission:
a=input().split()
b=0
for i in a:
  if i in ['5','7']:
    b=b+int(i)
    re='Yes'
  else:
    b=b+int(i)
    re='No'
    break
    
if b==17 and re!='No':
  print('YES')
else:
  print('NO')
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

Incorrect submission (verdict: Wrong Answer):
N=int(input())
s=[]
#print(type(N))
for i in range(N):
    s.append(input())

print(s)
aa=["AC","WA","TLE","RE"]
for a in aa:
    print("{} × {}".format(a,str(s.count(a))))

Fixed, accepted submission:
N=int(input())
s=[]
for i in range(N):
    s.append(input())

aa=["AC","WA","TLE","RE"]
for a in aa:
    print("{} x {}".format(a,str(s.count(a))))
Problem:
You are given a string S consisting of lowercase English letters. We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom.

Incorrect submission (verdict: Wrong Answer):
s=input()
n=int(input())
ans=''
for i in range(n):
  if i%n==0:
    ans+=s[i]
print(ans)
    

Fixed, accepted submission:
s=input()
n=int(input())
ans=''
for i in range(len(s)):
  if i%n==0:
    ans+=s[i]
print(ans)
Problem:
Joisino is about to compete in the final round of a certain programming competition. In this contest, there are N problems, numbered 1 through N. Joisino knows that it takes her T_i seconds to solve problem i(1≦i≦N).  Also, there are M kinds of drinks offered to the contestants, numbered 1 through M. If Joisino takes drink i(1≦i≦M), her brain will be stimulated and the time it takes for her to solve problem P_i will become X_i seconds. It does not affect the time to solve the other problems.  A contestant is allowed to take exactly one of the drinks before the start of the contest. For each drink, Joisino wants to know how many seconds it takes her to solve all the problems if she takes that drink. Here, assume that the time it takes her to solve all the problems is equal to the sum of the time it takes for her to solve individual problems. Your task is to write a program to calculate it instead of her.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
m = 10 ** 9 + 7
 
from collections import Counter
ca = Counter(a)
d = n % 2
if d == 1:
    z = ca.pop(0) if 0 in ca else 0
    if z != 1:
        print(0)
        exit()
 
for i in range(1 + d, n + d, 2):
    if ca[i] != 2:
        print(0)
        exit()
 
print(pow(2,n//2, m))

Fixed, accepted submission:
import sys
n=int(input())
lineas=sys.stdin.readline()
arr=[]
arr=lineas.split()
arr=list(map(int,arr))
arr.insert(0,0)
m=int(input())
suma=0
lineas2=sys.stdin.readlines()
for i in range(m):
  arr2=lineas2[i].split()
  p=int(arr2[0])
  x=int(arr2[1])
  arr3=arr[:]
  arr3[p]=x
  for i in arr3:
    suma=suma+i
  print(suma)
  suma=0
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
def main():
    l = list(map(int,(input().split())))
    if l.count(5)==2 and l.count(7) == 1:
        print("Yes")
    else:
        print("No")
main()

Fixed, accepted submission:
def main():
    l = list(map(int,(input().split())))
    if l.count(5)==2 and l.count(7) == 1:
        print("YES")
    else:
        print("NO")
main()
Problem:
Snuke has a grid consisting of three squares numbered 1, 2 and 3. In each square, either `0` or `1` is written. The number written in Square i is s_i.  Snuke will place a marble on each square that says `1`. Find the number of squares on which Snuke will place a marble.

Incorrect submission (verdict: Wrong Answer):
a = input()

count = 0
for i in a.split():
  if i == 1:
    count += 1

print(count)

Fixed, accepted submission:
a = input()

count = 0
for i in list(a):
    if i == '1':
        count += 1

print(count)
Problem:
Write a program which reads an integer n and identifies the number of combinations of a, b, c and d (0 ≤ a, b, c, d ≤ 9) which meet the following equality:      a + b + c + d = n      For example, for n = 35, we have 4 different combinations of (a, b, c, d): (8, 9, 9, 9), (9, 8, 9, 9), (9, 9, 8, 9), and (9, 9, 9, 8).

Incorrect submission (verdict: Wrong Answer):
user = input()
n = int(user)
num = 0
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                if(n == a + b + c + d):
                    num += 1

print(num)

Fixed, accepted submission:
import sys

for user in sys.stdin:
    n = int(user)
    num = 0
    for a in range(10):
        for b in range(10):
            for c in range(10):
                for d in range(10):
                    if(n == a + b + c + d):
                        num += 1

    print(num)
Problem:
The commonly used bills in Japan are 10000-yen, 5000-yen and 1000-yen bills. Below, the word "bill" refers to only these.  According to Aohashi, he received an otoshidama (New Year money gift) envelope from his grandfather that contained N bills for a total of Y yen, but he may be lying. Determine whether such a situation is possible, and if it is, find a possible set of bills contained in the envelope. Assume that his grandfather is rich enough, and the envelope was large enough.

Incorrect submission (verdict: Wrong Answer):
def f04():
    n, y=map(int, input().split())
    answer=-1,-1,-1
    for x in range(n+1):
        for y in range(n-x+1):
            z=n-x-y
            if 0<=z<=2000 and 10000*x+5000*y+1000*z==y:
                answer=x,y,z
                break
    print(*answer)
f04()

Fixed, accepted submission:
def f04():
    N,Y=map(int,input().split())
    answer=-1,-1,-1
    for x in range(N+1):
        for y in range(N-x+1):
            z=N-x-y
            if 0<=z<=2000 and 10000*x+5000*y+1000*z==Y:
                answer=x,y,z
                break
        else:
            continue
        # break
    print(*answer)

f04()
Problem:
Determine if we can choose K different integers between 1 and N (inclusive) so that no two of them differ by 1.

Incorrect submission (verdict: Wrong Answer):
N, K = map(int,input().split())
if (N/2 + 1) >= K:
    print("Yes")
else:
    print("No")

Fixed, accepted submission:
N, K = map(int,input().split())
if N % 2 != 0:
    if (N/2 + 1) >= K:
        print("YES")
    else:
        print("NO")
else:
    if (N/2) >= K:
        print("YES")
    else:
        print("NO")
Problem:
M-kun has the following three cards:    * A red card with the integer A.   * A green card with the integer B.   * A blue card with the integer C.  He is a genius magician who can do the following operation at most K times:    * Choose one of the three cards and multiply the written integer by 2.  His magic is successful if both of the following conditions are satisfied after the operations:    * The integer on the green card is **strictly** greater than the integer on the red card.   * The integer on the blue card is **strictly** greater than the integer on the green card.  Determine whether the magic can be successful.

Incorrect submission (verdict: Wrong Answer):
a,b,c=map(int,input().split())
k=int(input())

cnt=0

for i in range(k):
	b*=2
	cnt+=1

for i in range(k-cnt):
	c*=2

if a<b<c:
	print("Yes")
else:
	print("No")

Fixed, accepted submission:
a,b,c=map(int,input().split())
k=int(input())

cnt=0

for i in range(k):
	if b>a:
		break
	b*=2
	cnt+=1
for i in range(k-cnt):
	c*=2

if a<b<c:
	print("Yes")
else:
	print("No")
Problem:
There is a data which provides heights (in meter) of mountains. The data is only for ten mountains.  Write a program which prints heights of the top three mountains in descending order.

Incorrect submission (verdict: Wrong Answer):
# coding: utf-8

list = []

for i in range(10):
    list.append(int(input()))

slist = sorted(list)

for i in range(3):
    print(slist[i+1])

Fixed, accepted submission:
# coding: utf-8

list = []

for i in range(10):
    list.append(int(input()))

slist = sorted(list)

for i in range(3):
    print(slist[9-i])
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())
d = [a,b,c]
d = sorted(d)
#print(d)
if d ==[5,5,7]:
  print('Yes')

Fixed, accepted submission:
a,b,c=list(map(int,input().split()))
s=[a,b,c]
if s.count(5)==2 and s.count(7)==1:
  print("YES")
else:
  print("NO")
Problem:
Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.   Currently, he is located at the point (sx,sy). In each second, he can move up, down, left or right by a distance of 1.   Here, both the x\- and y-coordinates before and after each movement must be integers.   He will first visit the point (tx,ty) where sx < tx and sy < ty, then go back to the point (sx,sy), then visit the point (tx,ty) again, and lastly go back to the point (sx,sy).   Here, during the whole travel, he is not allowed to pass through the same point more than once, except the points (sx,sy) and (tx,ty).   Under this condition, find a shortest path for him.

Incorrect submission (verdict: Wrong Answer):
sx, sy, tx, ty = 0, 0, 1, 2
sx, sy, tx, ty = map(int,input().split())


def calculate(sx, sy, tx, ty):

    width = abs(sx-tx)
    height = abs(sy-ty)

    if tx - sx > 0:
        if ty - sy > 0:
            Up = 'U'
            Down = 'D'
            Left = 'L'
            Right = 'R'
        else:
            Up = 'D'
            Down = 'U'
            Left = 'L'
            Right = 'R'
    else:
        if ty - sy > 0:
            Up = 'U'
            Down = 'D'
            Left = 'R'
            Right = 'L'
        else:
            Up = 'D'
            Down = 'U'
            Left = 'R'
            Right = 'L'

    print(Up*height + Right*width + Down*height + Left*width + Left + Up*(height+1) + Right*(width+2) + Down * (height + 2) + Left * (width + 1) + Up)


calculate(sx,sy,tx,ty)

Fixed, accepted submission:
def calculate(cx1, cy1, cx2, cy2):

    Up = 'U'
    Right = 'R'
    Left = 'L'
    Down = 'D'

    h = abs(cy2 - cy1)
    w = abs(cx2 - cx1)

    if cx2 > cx1:
        if cy2 < cy1:
            Down = 'U'
            Up = 'D'
    else:
        if cy2 > cy1:
            Left = 'R'
            Right = 'L'
        else:
            Left = 'R'
            Right = 'L'
            Down = 'U'
            Up = 'D'

    return h * Up + w * Right + h * Down + (w + 1) * Left + (h + 1) * Up + (w + 1) * Right + Down + Right + (
            h + 1) * Down + (w + 1) * Left + Up


cx1, cy1, cx2, cy2 = -2, -2, 1, 1
cx1, cy1, cx2, cy2 = map(int,input().split())

print(calculate(cx1, cy1, cx2, cy2))