1 #include <iostream> 2 #include <stdio.h> 3 using namespace std; 4 5 int main() 6 { 7 int s, d; 8 while(scanf("%d%d" ,&s, &d) != EOF) 9 { 10 int i; 11 for(i = 1; i <= 5; i++) 12 { 13 if( s * (5-i) - d * i < 0 ) 14 { 15 break; 16 } 17 } 18 19 int ans; 20 if(i == 4) 21 { 22 ans = 3 * s - 9 * d; 23 } 24 else 25 { 26 ans = s * (12-2*i) - d * 2 * i; 27 } 28 29 if(i == 5 || ans < 0) 30 { 31 printf("Deficit\n"); 32 } 33 else 34 { 35 printf("%d\n",ans); 36 } 37 38 } 39 40 return 0; 41 } 42 //end 43 //ism