EMP  University Employees
On some island each inhabitant is either a knight who only tells the truth, or a liar who always lies. Also, on the island there exists a university of technology where some of the inhabitants work. All of the university employees will always tell you the following two things, no matter which employee you ask:
It is also known that no two employees of the university have an identical salary, and no two work equally. Write a program which will compute how many persons are employed by this university.
Input
The only input line contains two integers N and M, with one space between them [N, M <= 1000000000].
Output
The output must contain only one integer  the total number of employees of this university, or 0 if there is no way to find the number of employees.
Example
Input: 1 1 Output: 2
Author: Filimonenkov D.O.
hide comments
avidcoder:
20151106 12:05:18
Don't trust any employee. But always trust one. 

scyth3r:
20150714 21:26:43
1 line of code in python :D :D 

agaurav77:
20141211 09:46:55
The language is unclear. Does working more mean more salary? I got AC but I think the question's first fact should have "fewer or equal to N" instead of "fewer than N". Last edit: 20141211 09:47:22 

atom:
20140710 12:14:20
WTF Awesome logic...the best question ever...100 LOC 

Samil Vargas:
20140108 16:47:50
[spoiler removed] Last edit: 20140108 18:49:36 

(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20130821 02:38:36
too easy, even for brainf**k :P 

~ignited~:
20130212 16:09:58
bekar..... waste of time... 

Unnati Gupta:
20130124 05:44:17
4 lines of code in Python.. 

saket diwakar:
20120703 18:30:48
PROBLEM MUST BE DELETED. 

Fish3R:
20120627 07:21:23
Easiest Question... :D 
Added by:  Roman Sol 
Date:  20060424 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  ZCon 2007 