Problem

Write a program to obtain a number NN and increment its value by 1 if the number is divisible by 4 otherwise decrement its value by 1.
Input Format
First line will contain a number NN.
Output Format
Output a single line, the new value of the number.
Related Post
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
Constraints
0≤N≤1000
Sample
Input
5
Output
4
Related Post
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
Explanation
Since 5 is not divisible by 4 hence, its value is decreased by 1.
Solution

cpp
#include <iostream>
using namespace std;
// Solution from : Code Radius [ https://radiuscode.blogspot.com/ ]
int main() {
int n;
cin>>n;
if(n%4==0)
++n;
else --n;
cout<<n<<endl;
return 0;
}
Related Post
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
HTML Tutorial | Code Radius
Challenge for Most Difficult Problem : CHMDFP032 | Codechef Solution
All Post sort by Category
Chef and Chefina : CFCFNA | Codechef Solution
Please First Try to Solve Problem by Yourself.