public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  String YMD = sc . next ( ) ;
  SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy/MM/dd" ) ;
  SimpleDateFormat sdf2 = new SimpleDateFormat ( "yyyyMMdd" ) ;
  Date date = new Date ( ) ;
  Date d1 = new Date ( ) ;
  String Day1 = "" ;
  String Day2 = "" ;
  try {
    date = sdf . parse ( YMD ) ;
  }
  catch ( ParseException e ) {
    e . printStackTrace ( ) ;
  }
  Calendar calendar = Calendar . getInstance ( ) ;
  calendar . setTime ( date ) ;
  Day1 = sdf2 . format ( date ) ;
  if ( Double . valueOf ( Day1 . substring ( 0 , 4 ) ) / Double . valueOf ( Day1 . substring ( 4 , 6 ) ) % Integer . valueOf ( Day1 . substring ( 6 , 8 ) ) == 0 ) {
    System . out . println ( sdf . format ( date ) ) ;
  }
  else {
    while ( 1 == 1 ) {
      calendar . add ( Calendar . DATE , 1 ) ;
      d1 = calendar . getTime ( ) ;
      Day1 = sdf2 . format ( d1 ) ;
      if ( Double . valueOf ( Day1 . substring ( 0 , 4 ) ) / Double . valueOf ( Day1 . substring ( 4 , 6 ) ) % Integer . valueOf ( Day1 . substring ( 6 , 8 ) ) == 0 ) {
        System . out . println ( sdf . format ( d1 ) ) ;
        break ;
      }
    }
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String YMD = sc . next ( ) ; SimpleDateFormat sdf = new SimpleDateFormat ( " yyyy / MM / dd " ) ; SimpleDateFormat sdf2 = new SimpleDateFormat ( " yyyyMMdd " ) ; Date date = new Date ( ) ; Date d1 = new Date ( ) ; String Day1 = " " ; String Day2 = " " ; try { date = sdf . parse ( YMD ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; } Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( date ) ; Day1 = sdf2 . format ( date ) ; if ( Double . valueOf ( Day1 . substring ( 0 , 4 ) ) / Double . valueOf ( Day1 . substring ( 4 , 6 ) ) % Integer . valueOf ( Day1 . substring ( 6 , 8 ) ) == 0 ) { System . out . println ( sdf . format ( date ) ) ; } else { while ( 1 == 1 ) { calendar . add ( Calendar . DATE , 1 ) ; d1 = calendar . getTime ( ) ; Day1 = sdf2 . format ( d1 ) ; if ( Double . valueOf ( Day1 . substring ( 0 , 4 ) ) / Double . valueOf ( Day1 . substring ( 4 , 6 ) ) % Integer . valueOf ( Day1 . substring ( 6 , 8 ) ) == 0 ) { System . out . println ( sdf . format ( d1 ) ) ; break ; } } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (try_statement body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal)))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal)))))) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) alternative: (block (while_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal)))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal)))))) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (break_statement)))))))))