public static void main ( String [ ] args ) {
  FastReader fr = new FastReader ( ) ;
  int n = fr . nextInt ( ) - 1 ;
  if ( n < 0 ) System . out . println ( 1 ) ;
  else {
    BigInteger result = new BigInteger ( "3" ) ;
    BigInteger mod = new BigInteger ( "1000003" ) ;
    BigInteger exp = new BigInteger ( Integer . toString ( n ) ) ;
    result = result . modPow ( exp , mod ) ;
    System . out . println ( result . toString ( ) ) ;
  }
}

public static void main ( String [ ] args ) { FastReader fr = new FastReader ( ) ; int n = fr . nextInt ( ) - 1 ; if ( n < 0 ) System . out . println ( 1 ) ; else { BigInteger result = new BigInteger ( "3" ) ; BigInteger mod = new BigInteger ( "1000003" ) ; BigInteger exp = new BigInteger ( Integer . toString ( n ) ) ; result = result . modPow ( exp , mod ) ; System . out . println ( result . toString ( ) ) ; } }
(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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) alternative: (block (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 (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) (identifier))))) (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)))))))))