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):
m_one = list(map(int, input().split()))
m_two = list(map(int,input().split()))
print(1 if m_one[1] > m_two[1] else 0)

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

Solution (Python):
l1 = [int(i) for i in input().split()]
l2 = [int(i) for i in input().split()]
if l1[0] == l2[0]:
    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):
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())
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):
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):
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 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(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(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("1")
else:
  print("0")

Solution (Python):


prev = input().split()[0]
next = input().split()[0]

if prev != next:
    print("1")
else:
    print("0")

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

Solution (Python):
a = input()
b = input()
month_a = int(a.split(" ")[0])
month_b = int(b.split(" ")[0])
if month_a != month_b:
	val = 1
else:
	val = 0
print(val)

Solution (Python):
x = []
y = []
for i in range(2):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)

if x[0]!=x[1]:
    print(1)
else:
    print(0)

Solution (Python):
n, m = (int(x) for x in input().split())
n1, m1 = (int(a) for a in input().split())
if n==n1:
    print('0')
else:
    print('1')

Solution (Python):
M1,D1 = list(map(int,input().split()))
M2,D2 = list(map(int,input().split()))
if (M1 != M2 and M2>M1) or M2 == 1 and M2<M1:
    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 in [1, 3, 5, 7, 8, 10, 12]:
    if D1 == 31:
        print(1)
    else:
        print(0)
elif M1 in [4, 6, 9, 11]:
    if D1 == 30:
        print(1)
    else:
        print(0)
elif M1 == 2:
    if D1 == 28:
        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 d == 1:
  print("1")
else:
  print("0")

Solution (Python):
_ = list(map(int, input().split()))
_, n = list(map(int, input().split()))
if n == 1:
    print(1)
else:
    print(0)

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

Solution (Python):
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    m, d = list(map(int, input().rstrip('\n').split()))
    m, d = list(map(int, input().rstrip('\n').split()))
    print(1 if d == 1 else 0)


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
m,d = map(int,input().split())
m2,d2 = map(int,input().split())
if(m!=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):
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())
print(['0','1'][m1<m2])

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

if a[0] != b[0]:
  print(1)
else:
  print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m1<=11:
  if m2==m1+1 and d2==1:
    print(1)
  else: 
    print(0)
elif m1==12:
  if m2==1 and d2==1:
    print(1)
  else: 
    print(0)
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(0)
else:
    print(1)

Solution (Python):
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if (a[0] != b[0]):
  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+1 == c:
  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):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

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

Solution (Python):
a = input().split()
m1 = int(a[0])
b = input().split()
m2 = int(b[0])

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

Solution (Python):
dates = [list(map(int, input().split())) for _ in range(2)]
print("{}".format("1" if dates[0][0] < dates[1][0] or (dates[0][0] == 12 and dates[0][1] == 1) else "0"))

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

    ans = '1' if m1 != m2 else '0'
    print(ans)
mainFunc()

Solution (Python):
m,d=map(int,input().split())
s,t=map(int,input().split())
if t==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):



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):
lst = list(map(int,input().split()))
lst2 = list(map(int,input().split()))
if lst2[1] == 1:
    print(1)
else:
    print(0)

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

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

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+1==m2:
  print(1)
else:
  print(0)

Solution (Python):

import datetime
import calendar

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

day1 = datetime.date(2019, m1, d1)
day2 = datetime.date(2019, m1, calendar.monthrange(2019, m1)[1])

if day1 == day2:
    print("1")
else:
    print("0")

Solution (Python):
m0, d0 = map(int, input().split())
m1, d1 = map(int, input().split())
print('0') if m0 == m1 else print('1')

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

b=int(b)
d=int(d)

if d-b==1:
    print("0")
else:
    print("1")

Solution (Python):
m1, d1 = (int(i) for i in input().split())
m2, d2 = (int(i) for i in input().split())

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

Solution (Python):
md1=input()
md2=input()

m1st,d1st=md1.split()
m2st,d2st=md2.split()


m1=int(m1st)
d1=int(d1st)

m2=int(m2st)
d2=int(d2st)



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

Solution (Python):
li = []
for i in range(2):
  a,b = map(int, input().split())
  li.append(a)
  
if li[1] == li[0]+1:
  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):
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):
a,b = list(map(int, input().split()))
c,d = list(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())

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

Solution (Python):
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def sRaw():
    return input().rstrip("\r")

def iRaw():
    return int(input())


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


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


DIV = 998244353

def main():
    MD = isRaw()
    MD2 =isRaw()
    return 0 if MD[0] == MD2[0] else 1

if __name__ == "__main__":
    print(main())

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

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(0 if m1==m2 else 1)

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):
a, b = map(int, input().split())
c, d = map(int, input().split())

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

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

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

if M2 == M1 + 1 and 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):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2==1 and m2==m1+1:
  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(0)
else:
  print(1)

Solution (Python):
in1=input().split()
in2=input().split()
if int(in1[0])==int(in2[0]):
  print(0)
else:
  print(1)

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 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):
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 != 12:
  if m2 == m1+1:
    print(1)
  else:
    print(0)
else:
  if m2 == 1:
    print(1)
  else:
    print(0)

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

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 D2 == 1:
    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(0)
else:
    print(1)

Solution (Python):
x = input()
y = input()
l = x.split()
l2 = y.split()
if l[0] != l2[0]:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, raw_input().split())
m2, d2 = map(int, raw_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 D2==1:
  print(1)
else:
  print(0)

Solution (Python):
day0 = list(map(int, input().split()))[1]
day1 = list(map(int, input().split()))[1]
if day0 > day1:
  print(1)
else:
  print(0)

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):
D1 = list(int(i) for i in input().split())
D2 = list(int(i) for i in input().split())

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

Solution (Python):
m1, _ = input().split(" ")
m2, _ = input().split(" ")
ans = 0
if m1 != m2:
  ans = 1
print(ans)

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

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

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

if m-M == 1 or m-M == -11:
  print(1)
  
else:
  print(0)

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

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

Solution (Python):
m1,d1 = [int(_) for _ in input().split()]
m2,d2 = [int(_) for _ in 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):
m1,d1 = input().split(" ")
m2, d2 = 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):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

m1,d1 = LI()
m2,d2 = LI()
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):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


M1 , _ = list(map(int, sys.stdin.buffer.readline().split()))
M2 , _ = list(map(int, sys.stdin.buffer.readline().split()))
print((M2 - M1) % 12)

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

Solution (Python):
m1,d1 = map(int, input().strip().split(' '))
m2,d2 = map(int, input().strip().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 and d2 == 1:
    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 D1>D2 and M2>M1:
    print(1)
else:
    print(0)

Solution (Python):
m=input().split()
M=input().split()
 
if int(M[0]) - int(m[0]) == 1:
  print('1')
else:
  print('0')

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

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

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

Solution (Python):
m,d = map(int,input().split())
mm,dd = map(int,input().split())
if dd == 1:
	print(1)
else:
	print(0)

Solution (Python):
def solve(m1, d1, m2, d2):
    return int(m1 != m2)

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

Solution (Python):
targetDay = input().split()
nextDay	  = input().split()

if targetDay[0] != nextDay[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):
M1, D1 = [int(_) for _ in input().split()]
M2, D2 = [int(_) for _ in input().split()]

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

Solution (Python):

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

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

Solution (Python):
s1 = list(map(int,input().split()))
s2 = list(map(int,input().split()))
 
         
if int(s1[0])+1 == int(s2[0]):
         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):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == 12 and m2 == 1:
	print("1")

elif m2 - m1 == 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(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):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(0 if m1 == m2 else 1)

Solution (Python):
def main():
    today = input().split()
    tomo = input().split()
    if today[0] == tomo[0]:
        print(0)
    else:
        print(1)
if __name__ == '__main__':
    main()

Solution (Python):
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

if x[0] != y[0]:
    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):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
print(1 if M1 != M2 else 0)

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

print(0 if D1 < D2 else 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=input().split()
b=input().split()
if a[0] != b[0]:
	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, raw_input().strip().split())
m2, d2 = map(int, raw_input().strip().split())
print 1 if m1 != m2 else 0

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

if d==1:
    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):
a, b = map(int,input().split())
c, d = map(int,input().split())

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

Solution (Python):

import sys
input = sys.stdin.readline

m1, d1 = [int(item) for item in input().split()]
m2, d2 = [int(item) for item in 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):
m,d=map(int,input().split())
n,e=map(int,input().split())
print(1 if m!=n else 0)

Solution (Python):
A,B,C,D = map(int, open(0).read().split())
print(int(A != C))

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m2!=m1:
    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):
month1,day1,=map(int,input().split())
month2,day2,=map(int,input().split())
if month1==month2:
  print("0")
else:
  print("1")

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

if M1 in [1, 3, 5, 7, 8, 10, 12]:
	if D1 == 31:
		print("1")
	else:
		print("0")
elif M1 == 2:
	if D1 == 28:
		print("1")
	else:
		print("0")
else:
	if D1 == 30:
		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):
m, d = map(int, input().split())
print(1 if int(input().split()[1])-d!=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):
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())
if m1 != m2:
  print(1)
else:
  print(0)

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

print(0 if M1 == M2 else 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())

print(m2-m1)

Solution (Python):
def main(M_1: int, D_1: int, M_2: int, D_2: int):
    print(M_2 - M_1)


if __name__ == "__main__":
    M_1, D_1 = map(int, input().split())
    M_2, D_2 = map(int, input().split())

    main(M_1, D_1, M_2, D_2)

Solution (Python):
import datetime

M,D = map(int,raw_input().split())
ans = format((datetime.date(2019, M, D) + datetime.timedelta(days = 1)).day)

if int(ans) == 1:
  print "1"
else:
  print "0"

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

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

Solution (Python):
def main(lst):
    m_1, d_1, m_2, d_2 = lst[0], lst[1], lst[2], lst[3]

    before = False
    after = None

    lst_1 = [1, 3, 5, 7, 8, 10, 12]
    lst_2 = [2]
    lst_3 = [4, 6, 9, 11]

    if m_1 in lst_1:
        if d_1 == 31:
            before = True
            if m_2 == m_1 + 1 or m_2 == 1:
                if d_2 == 1:
                    after = True
        else:
            before = False
    elif m_1 in lst_2:
        if d_1 == 28:
            before = True
            if m_2 == 3:
                if d_2 == 1:
                    after = True
        else:
            before = False
    if m_1 in lst_3:
        if d_1 == 30:
            before = True
            if m_2 == m_1 + 1:
                if d_2 == 1:
                    after = True
        else:
            before = False

    if before == True and after == True:
        return 1
    else:
        return 0


if __name__ == '__main__':
    before = list(map(int, input().rstrip().split()))
    after = list(map(int, input().rstrip().split()))

    print(main(before + after))

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 = 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 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(1)
else:
    print(0)

Solution (Python):
M1, D1 = [int(_) for _ in input().split(" ")]
M2, D2 = [int(_) for _ in 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):

date1 = input().split(" ")
date2 = input().split(" ")

if date1[0] != date2[0]:
  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):
m1,d1=(int(x) for x in input().split())
m2,d2=(int(x) for x in input().split())
if m1!=m2:
    print('1')
else:
    print('0')

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
mod = 10**9+7


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())
print(int(M1!=M2))

Solution (Python):
m,d=map(int,input().split())
if m in [1,3,5,7,8,10,12] and d==31:
  print(1)
elif m ==2 and d==28:
  print(1)
elif m in [4,6,9,11] and d==30:
  print(1)
else:
  print(0)

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):
def main():
  M1, D1 = map(int, input().split())
  M2, D2 = map(int, input().split())
  print(0) if M1 == M2 else print(1)

if __name__ == '__main__':
  main()

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

if(m2 != m1):
    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("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 solve():
	m1, d1, m2, d2 = map(int, open(0).read().split())
	if m1 != m2:
		print('1')
	else:
		print('0')
solve()

Solution (Python):
print(+(input()[:2]!=input()[:2]))

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print((m1<m2 and d1>d2)+0)

Solution (Python):
input()
print(1 if int(input().split()[1])==1 else 0)

Solution (Python):
print(int(input()[:2] != input()[:2]))

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

Solution (Python):
from sys import stdin
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


M1, D1 = map(int, stdin.readline().rstrip().split())
M2, D2 = map(int, stdin.readline().rstrip().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):
str1 = input().split()
str2 = input().split()

m1 = str1[0]
d1 = str1[1]
m2 = str2[0]
d2 = str2[1]

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

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

print(ans)

Solution (Python):
print '1' if int(raw_input().split(' ')[1]) > int(raw_input().split(' ')[1]) 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):
import sys

def main():
    m1, d1, m2, d2 = map(int, sys.stdin.read().split())
    if m1 == m2:
        ans = 0
    else:
        ans = 1
    print(ans)
    
if __name__ == '__main__':
    main()

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

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

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)