Author:  A. Zhuplev  Time limit:  1 sec  
Input file:  input.txt  Memory limit:  256 Mb  
Output file:  output.txt 
This problem has absolutely no relation to cars and car races.
Consider a sequence B_{i} defined as follows: First two elements (B_{1} and B_{2}) are natural numbers whose decimal representations consist of N and M "1" digits correspondingly. Following terms are computed according to the formula: B_{i} = B_{i−2} − B_{i−1}.
Your program should find such an element B_{k} that B_{k+1} = 0 and B_{j} ≠ 0 for all 1 ≤ j ≤ k.
In the second sample B_{1} = 11, B_{2} = 1111, B_{3} = 1100, B_{4} = 11, B_{5} = 1089, B_{6} = 1078, …, B_{151} = 11, B_{152} = 11, B_{153} = 0, ….
Input file contains two natural numbers N and M.
Output file should contain a single integer — B_{k} or 0 if there's no zero term in B series. Note that the value of B_{k} may be very large.
1 ≤ N, M ≤ 10^{6}
No.  Input file (input.txt ) 
Output file (output.txt ) 

1 


2 

