# import bisect # Binary Search module for list # import sys # from sys import stdin, exit, setrecursionlimit # from collections import deque # from collections import Counter # from itertools import accumulate # from heapq import heappop, heappush # from atcoder.segtree import SegTree # from sortedcontainers import SortedSet, SortedList, SortedDict # input = stdin.readline def main(): P, Q, Y0, p, q, Y = map(int, input().split()) for i in range(Y-Y0): p+=1 q+=1 if P