Ritika has a coin of $N but she is the type of person who loves to have as much money as possible. A coin of $N can be exchanged in a bank into three coins of: $n/2, $n/3 and $n/4. But these numbers are all rounded down. Ritika decides to exchange her coin in the greed of money and makes profit. Your task is to find the maximum amout of money she can have at the end of exchange.

Note: Ritika will not exchange her money if the amount she get back after exchange is less than or same as of her current amount.

**Input:**

First line of the input contains an integer T denoting the number of test cases. Each testcase contains a single line with a number N.

**Output:**

For each test case output a single line, containing the maximum amount of money Riitika can make.

**Constraints:**

1<=T<=100

0 <= N<= 1 000 000 000

**Example:**

**Input:**

2

5

12

**Output:**

5

13

**Explanation:**

For First testcase: 5=>5/2+5/3+5/4=2+1+1=4<5 which means 5 can't be exchanged to earn profit so it itself is the maximum amount .

For second testcase :12=>12/2+12/3+12/4=6+4+3=13 (>12)after exchange.Now 6,4,3 can't be exchanged further to get profit.

Author: Riya Bhardwaj

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

makeitdonesolo | 64 |

ShubhamJain18 | 64 |

Bishnu Dev Panda | 54 |

DanishBansal | 50 |

abhithakur588 | 50 |

Bishnu Dev Panda | 777 |

yk12 | 512 |

okayboss | 490 |

DevMittal | 472 |

VijethaShastri | 431 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.