import java.util.*;
import java.lang.*;
class Brainly{
public static void main(String[] args){
Scanner sc = new Scanner(System.in); // то для ввода
System.out.print("Enter ch: ");
int ch = sc.nextInt();
int size = 0;
int toWil = 1;
int i = 1;
while(toWil == 1){
ch /= (10 * i);
if(ch == 0){
toWil = 0;
}
else{
size++;
};
};
int arr[] = new int[size];
i = 1;
while(toWil == 0){
ch /= (10 * i);
if(ch == 0){
toWil = 1;
}
else{
arr[i - 1] = ch;
};
};
i = 0;
while(toWil == 1){
arr[i] += 4;
if(arr[i] >= 10){
if(i == (size - 1)) {
}
else{
arr[i + 1] += 1;
};
};
};
for(i = size; i >= 1; i++){
System.out.print(arr[i]);
}
}
}