18 lines
221 B
C
18 lines
221 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
int main(void) {
|
|
int x;
|
|
scanf("%d",&x);
|
|
if (x%3==0)
|
|
printf("%d\n" , x);
|
|
if (x%3==1)
|
|
printf("%d\n", x-1);
|
|
if (x%3==2)
|
|
printf("%d\n", x+1);
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
|
|
|
|
|
|
|