SKS001  Secret Recipe
Harsh and Vishal are besties.Vishal has a secret recipe which would land both of them a job.But he his unwilling
to share his recipe.
Both of them are standing on the positive side of xaxis.Harsh is on coordinate i and Vishal on j(i<=j).Harsh can make two kinds of moves,
if he is standing on coordinate m he could either move to m+1 or a coordinate n such that n is prime.The cost of jumping is the value of the coordinate on which Harsh jumps.
Vishal would give his recipe only if Harsh reaches him in minimum total cost.Help Harsh out.
Input
The first line of input contains two integers i and j (i<=j) as mentioned above.
0<=i,j<=2*10^9
Output
Output a single line containing minimum cost to reach j from i.
Example
Input: 2 4
Output: 7
hide comments
akjol2049:
20181109 12:50:38
he cant move backwards..(to m1) right? Last edit: 20181109 12:51:15 

abhishak69:
20181004 20:17:45
hints

Added by:  Shuvam 
Date:  20180724 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Own 