Problem:
 Score: 100 points    Problem Statement  In this problem, a date is written as Y-M-D. For example, 2019 - 11 - 30 means November 30 , 2019 .  Integers M_1, D_1, M_2 , and D_2 will be given as input. It is known that the date 2019 - M_2 - D_2 follows 2019 - M_1 - D_1 . Determine whether the date 2019 - M_1 - D_1 is the last day of a month.      Constraints   Both 2019 - M_1 - D_1 and 2019 - M_2 - D_2 are valid dates in the Gregorian calendar.  The date 2019 - M_2 - D_2 follows 2019 - M_1 - D_1 .         Input  Input is given from Standard Input in the following format:  M_1  D_1  M_2  D_2       Output  If the date 2019 - M_1 - D_1 is the last day of a month, print 1 ; otherwise, print 0 .        Sample Input 1 11 16
11 17      Sample Output 1 0  November 16 is not the last day of a month.       Sample Input 2 11 30
12 1      Sample Output 2 1  November 30 is the last day of November.

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())

if a == c:
    print('0')
else:
    print('1')

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

print(1) if m1 != m2 else print(0)

Solution (Python):
M1, D1 = list(map(int, input().split()))
M2, D2 = list(map(int, input().split()))
print(1 if M1+1==M2 else 0)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if(M1 != M2): print(1)
else: print(0)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    m1, d1 = rli()
    m2, d2 = rli()
    if m1 != m2:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
M1,D1= map(int,input().split(' '))
M2,D2= map(int,input().split(' '))
if D2 > D1:
    print(0)
else:
    print(1)

Solution (Python):
import sys
input = sys.stdin.readline

M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print (0)
else:
    print (1)

Solution (Python):
def main():
    
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())

    if d2 == 1:
        print(1)
    else:
        print(0)

    


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int, input().split())

c,d=map(int, input().split())

if a==c:
    print(0)
else:
    print(1)

Solution (Python):
A, B = map(int, input().split())
C, D = map(int, input().split())

if A == C:
        print(0)
else:
        print(1)

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    if M1 == M2:
        print(0)
    else:
        print(1)



if __name__ == "__main__":
    main()

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 != m2:
  print(1)
else:
  print(0)

Solution (Python):
m1, d1 = map(int,input().split())
m2, d2 = map(int,input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
A,B = map(int, input().split())
C,D = map(int, input().split())

if A==C:
    print(0)
else:
    print(1)

Solution (Python):
m1 ,d1 = map(int, input().split())
m2 ,d2 = map(int, input().split())

if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
M, D = map(int, input().split())
m, d = map(int, input().split())

if M != m:
    print(1)

else:
    print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(0 if d1+1==d2 else 1)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(1 if m1!=m2 else 0)

Solution (Python):
m,d = map(int,input().split())
M,D = map(int,input().split())
if m != M:
  print(1)
else:
  print(0)

Solution (Python):
m1,_=map(int,input().split())
m2,_=map(int,input().split())
print(1 if m1<m2 else 0)

Solution (Python):

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict


def getlist():
	return list(map(int, input().split()))


def main():
	M1, D1 = getlist()
	M2, D2 = getlist()
	if M1 == M2:
		print(0)
	else:
		print(1)

if __name__ == '__main__':
	main()

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
import sys
import math
input = sys.stdin.readline


def main():
    sc = Scan()
    m1 = sc.intarr()[0]
    m2 = sc.intarr()[0]

    if m1 == m2:
        print("0")
    else:
        print("1")


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


main()

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())

if (m1+1)%13==m2:
  if d2==1:
    print(1)
    exit()
print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):


import math
import sys
import itertools
import numpy as np


a,b = map(int, input().split())

c,d = map(int, input().split())

if a==c:
    print("0")
else:
    print("1")

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 - D1 == 1:
    print(0)
else:
    print(1)

Solution (Python):
m_1,d_1 = map(int, input().split())
m_2,d_2 = map(int, input().split())
if m_1==m_2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):

a, b = map(int, input().split())
c, d = map(int, input().split())
if a != c:
    print(str(1))
else:
    print(str(0))

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
    print(1)
else:
    print(0)
exit(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m2 - m1 == 1:
    print("1")
else:
    print("0")

Solution (Python):
a,b=map(int,input().split())
a2,b2=map(int,input().split())
if a!=a2:
    print(1)
else:
    print(0)

Solution (Python):
n1,m1=map(int,input().split())
n2,m2=map(int,input().split())
if m1<m2:
  print(0)
else:
  print(1)

Solution (Python):
m_1,d_1=map(int,input().split())
m_2,d_2=map(int,input().split())
if m_1!=m_2:
    print(1)
else:
    print(0)

Solution (Python):

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d1>d2:
  ret="1"
else:
  ret="0"

print(ret)

Solution (Python):
a,b = map(int,input().split())
c,d = map(int,input().split())

if d == 1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = input().split()
m2, d2 = input().split()
print(int(m1 != m2))

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
print(1 if M1!=M2 and D2==1 else 0)

Solution (Python):
list = input()
x,y = map(int,input().split(" "))
if y==1:
  print(1)
else:
  print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(1 if m1 != m2 else 0)

Solution (Python):
M1, D1 = [int(i) for i in input().split()]
M2, D2 = [int(i) for i in input().split()]

if M1 + 1 == M2:
    print(1)
else:
    print(0)

Solution (Python):
from sys import stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]
C, D = [int(x) for x in stdin.readline().rstrip().split()]

if B + 1 != D:
    print(1)
else:
    print(0)

Solution (Python):
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())

if M1!=M2:
    print(1)
else:
    print(0)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
if a!=c:
  print(1)
else:
  print(0)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
md=[list(map(int,input().split())) for i in range(2)]
if md[0][0]!=md[1][0]:
    print(1)
else:
    print(0)

Solution (Python):
A, B, C, X = map(int, open(0).read().split())
if X!=1:print(0)
else:print(1)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2==1:
    print(1)
else:
    print(0)

Solution (Python):
a,b= map(int, input().split())
c,d= map(int, input().split())

if(a==c):
  print(0)
else:
  print(1)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
m, d = input().split()
m,d = input().split()
if d == "1":
    print(1)
else:
    print(0)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    m1, d1 = list(map(int, input().strip().split()))
    m2, d2 = list(map(int, input().strip().split()))
    if m1 != m2:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if M1+1==M2:
    print(1)
else:
    print(0)

Solution (Python):
from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())





x, y = intsput()

a, b = intsput()

if (x != a):
    print(1)
else:
    print(0)

Solution (Python):
print(int(input().split()[0] < input().split()[0]))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())


if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
import sys
input = sys.stdin.readline
m1, d1 = [int(x) for x in input().strip().split()]
m2, d2 = [int(x) for x in input().strip().split()]
if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())
if(M1 != M2):
    print("1")
else:
    print("0")

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(1 if d2==1 else 0)

Solution (Python):
import math
import itertools

def read():
    M1, D1 = list(map(int, input().strip().split()))
    M2, D2 = list(map(int, input().strip().split()))
    return M1, D1, M2, D2


def solve(M1, D1, M2, D2):
    if M1 != M2:
        return 1
    return 0
    
if __name__ == '__main__':
    inputs = read()
    output = solve(*inputs)
    print("%d" % output)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
if a+1==c:
    print(1)
else:
    print(0)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
if a!=c:
	print(1)
else:
	print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
print(1 if m1!=m2 else 0)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

print(1 if M1 != M2 else 0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
	print("1")
else:
	print("0")

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    m1,d1 = mi()
    m2,d2 = mi()

    if m1 == m2:
        print(0)
    else:
        print(1)
    


        


main()

Solution (Python):
m1,d1=map(int, input().split())
m2,d2=map(int, input().split())
if d2==1:
  print(1)
else:
  print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 == m2:
  print(0)
else:
  print(1)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())

if d2==1:
    print(1)
else:
    print(0)

Solution (Python):
import sys
from itertools import combinations, permutations

def solve():
    input = sys.stdin.readline
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    if M1 != M2: print(1)
    else: print(0)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
tmp = input().split()
M1 = int(tmp[0])
D1 = int(tmp[1])
tmp = input().split()
M2 = int(tmp[0])
D2 = int(tmp[1])

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1= map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
  print(1)
else:
  print(0)

Solution (Python):
m1,d1 = list(map(int, input().split()))
m2,d2 = list(map(int, input().split()))

print(0 if m1 == m2 else 1)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

print(0 if M1==M2 else 1)

Solution (Python):
m1,d1 = list(map(int,input().strip().split()))
m2,d2 = list(map(int,input().strip().split()))
if d2 == 1:
    print("1")
else:
    print("0")

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(0 if m1 == m2 else 1)

Solution (Python):
N, K = [int(x) for x in input().split()]
a, b = [int(x) for x in input().split()]
if N != a:
  print(1)
else:
  print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
    print("0")
else:
    print("1")

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2: print(0)
else: print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 < m2:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
  print(1)
else:
  print(0)

Solution (Python):
a = input()
b, c = map(int, input().split())
if c == 1:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = list(map(int, input().split()))
M2, D2 = list(map(int, input().split()))

if M1 == M2 - 1 and D2 == 1:
  print(1)
else:
  print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1==m2:
    print(0)
elif m1!=m2:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if M1+1==M2:
  print(1)
else:
  print(0)

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

if M1==M2:
    print(0)
else:
    print(1)

Solution (Python):
import sys
import math
from itertools import permutations
from itertools import combinations


sys.setrecursionlimit(10**7)
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1!=m2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2= map(int,input().split())
print(1) if d2 == 1 else print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 == m2:
	print (0)
else:
	print (1)

Solution (Python):
def main():
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    if M1 != M2:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
words = lambda t : list(map(t, input().split()))
a,b = words(int)
c,d = words(int)

if a != c:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if D2 == 1:
  print(1)
else:  
  print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
print(1 if D2 == 1 else 0)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    m1, d1 = LI()
    m2, d2 = LI()
    if m1 != m2:
        print("1")
    else:
        print("0")
if __name__ == '__main__':
    main()

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

m1,d1 = MAP()
m2,d2 = MAP()

if m1!=m2:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
    print('1')
else:
    print('0')

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
    print(1)

else:
    print(0)

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    M1,D1 = LMIIS()
    M2,D2 = LMIIS()
    if M1!=M2:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
print(int(M1 != M2))

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






a, b = list(map(int, input().split()))
c, d = list(map(int, input().split()))
if d == 1:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):

import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m1!=m2:
    print(1)
else:
    print(0)

Solution (Python):
def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def main():
    M1, D1 = read_values()
    M2, D2 = read_values()
    print(1 if M1 != M2 else 0)


if __name__ == '__main__':
    main()

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
print(1 if a!=c else 0)

Solution (Python):

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 == m2:
	print(0)
else:
	print(1)

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np








inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    M1, D1 = list(map(int,input().split()))
    M2, D2= LI()
    if M1==M2:
        print(0)
    else:
        print(1)

    


if __name__ == "__main__":
    main()

Solution (Python):
m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

if m_1 != m_2:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M, D = map(int, input().split())
M1, D1 = map(int, input().split())
if M == M1:
    print(0)
else:
    print(1)

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
from itertools import count
from functools import lru_cache
from collections import defaultdict
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok



def main():
    a,_ = mis()
    b,_ = mis()
    print(int(a!=b))


main()

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if d2 == 1:
    print('1')
else:
    print('0')

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
a,_,b,_=map(int,open(0).read().split())
print(int(a!=b))

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1+1 ==  m2:
    print(1)
else:
    print(0)

Solution (Python):
M1,D1 = [int(i) for i in input().split()]
M2,D2 = [int(i) for i in input().split()]

if M1!=M2:
    print(1)
else:
    print(0)

Solution (Python):

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 != m2 and d1 != d2:
    print(1)
else:
    print(0)

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    m1, d1 = list(map(int, readline().split()))
    m2, d2 = list(map(int, readline().split()))
    print(1 if m1 != m2 and m1 < m2 else 0)


if __name__ == '__main__':
    solve()

Solution (Python):
import sys
input=sys.stdin.readline
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m1==m2:
    print(0)
else:
    print(1)

Solution (Python):
def main():
    M1, D1 = list(map(int, input().split()))
    M2, D2 = list(map(int, input().split()))
    if M1 == M2:
        print(0)
    else:
        print(1)


if __name__ == "__main__":
    main()

Solution (Python):
a,b=[int(i)for i in input().split()]
c,d=[int(i)for i in input().split()]
print(int(a!=c))

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

m1, d1 = li()
m2, d2 = li()

print(1 if m1 != m2 else 0)

Solution (Python):
a,b = [int(i) for i in input().split()]
c,d = [int(i) for i in input().split()]

if a == c:
    print(0)
else:
    print(1)

Solution (Python):




a,b = map(int,input().split())
c,d = map(int,input().split())

if a!=c:
    print(1)
else:
    print(0)

Solution (Python):
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines



























def main():
	a,b=map(int,input().split())
	c,d=map(int,input().split())
	
	ans=0
	if a<c:
		ans=1
	print(ans)
	
	
	
if __name__ == "__main__":
		main()

Solution (Python):
M1,D1=map(int, input().split())
M2,D2=map(int, input().split())

if M1!=M2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1= map(int, input().split())
m2,d2= map(int, input().split())

if m1!=m2 and d2==1:
    print(1)
else:
    print(0)

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [M1, D1] = string_to_int(inputs[0])
    [M2, D2] = string_to_int(inputs[1])
    if M1 != M2:
        return 1
    return 0


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

Solution (Python):
m1,p1 = map(int,input().split())
m2,p2 = map(int,input().split())
if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(1 if m1!=m2 else 0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
print(1 if M1 != M2 else 0)

Solution (Python):
l=list(map(int,input().split()))
l2=list(map(int,input().split()))
if l[0]+1==l2[0]:
  print(1)
else:
  print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if (m1 == m2):
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

print(1 if d2 == 1 else 0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if M1!=M2:
	print(1)
else:
	print(0)

Solution (Python):
a, b = input().split()
c, d = input().split()
if a != c:
  print(1)
else:
  print(0)

Solution (Python):
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

M, D = IL()
MM, DD = IL()
if M == MM:
  print(0)
else:
  print(1)

Solution (Python):
n,m=map(int,input().split())
a,b=map(int,input().split())
if n==a:
    print(0)
else:
    print(1)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    m1,_=MI()
    m2,_=MI()
    if m1==m2:print(0)
    else:print(1)
main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

print(1 if M1 != M2 else 0)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
print((M1!=M2)*1)

Solution (Python):
import sys
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print("0")
else:
    print("1")

Solution (Python):
M1, D1=map(int, input().split())
M2, D2=map(int, input().split())

if M1!=M2:
  print(1)
else:
  print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m1==m2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m2 == m1 + 1:
    print(1)
else:
    print(0)

Solution (Python):
def p_a():
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())
    print(0 if m1 == m2 else 1)
    
p_a()

Solution (Python):
m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())
print(int(m1!=m2))

Solution (Python):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
if a1 == a2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

print(int(M1 != M2))

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M2 != M1 and D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
a, _ = raw_input().split()
b, _ = raw_input().split()
if a == b:
    print 0
else:
    print 1

Solution (Python):
import sys
input = sys.stdin.readline
x = list(map(int, input().split()))
y = list(map(int, input().split()))
if x[0] != y[0]: print(1)
else: print(0)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
if a==c:
  print(0)
else:
  print(1)

Solution (Python):
import sys
input = sys.stdin.readline


M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if D2<D1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1==m2:
    print(0)
else:
    print(1)

Solution (Python):


from collections import deque, defaultdict
import itertools as ite
import sys
import math
import decimal

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

M1, D1 = map(int, raw_input().split())
M2, D1 = map(int, raw_input().split())

print int(M1 != M2)

Solution (Python):
inf = float("inf")

a, b = map(int, input().split())
c, d = map(int, input().split())
if d == 1:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    M1, D1 = (int(i) for i in input().split())
    M2, D2 = (int(i) for i in input().split())
    if M1 != M2:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    m1,d1=map(int,input().split())
    m2,d2=map(int,input().split())
    if m1!=m2:
        print(1)
    else:
        print(0)
main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
M, D = map(int, input().split())
m2 , m3 = map(int, input().split())
if M!=m2:
  print(1)
else:
  print(0)

Solution (Python):
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

M1,D1 = many_int()
M2,D2 = many_int()

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    m,d=map(int,input().split())
    n,e=map(int,input().split())
    
    print(0 if m==n else 1)

if __name__ == '__main__':
    main()