public static void main ( String args [ ] ) throws Exception {
  StringTokenizer stok = new StringTokenizer ( new Scanner ( System . in ) . useDelimiter ( "\\A" ) . next ( ) ) ;
  StringBuilder sb = new StringBuilder ( ) ;
  int n = Integer . parseInt ( stok . nextToken ( ) ) ;
  int m = Integer . parseInt ( stok . nextToken ( ) ) ;
  long mod = ( long ) 1e9 + 7 ;
  long [ ] [ ] dp = new long [ 100005 ] [ 2 ] ;
  dp [ 1 ] [ 0 ] = 2 ;
  for ( int i = 2 ;
  i <= 100000 ;
  i ++ ) {
    dp [ i ] [ 0 ] = ( dp [ i - 1 ] [ 0 ] + dp [ i - 1 ] [ 1 ] ) % mod ;
    dp [ i ] [ 1 ] = dp [ i - 1 ] [ 0 ] ;
  }
  long tot = ( dp [ n ] [ 0 ] + dp [ n ] [ 1 ] + dp [ m ] [ 0 ] + dp [ m ] [ 1 ] + mod - 2 ) % mod ;
  System . out . println ( tot ) ;
}

public static void main ( String args [ ] ) throws Exception { StringTokenizer stok = new StringTokenizer ( new Scanner ( System . in ) . useDelimiter ( " \\ A " ) . next ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; int n = Integer . parseInt ( stok . nextToken ( ) ) ; int m = Integer . parseInt ( stok . nextToken ( ) ) ; long mod = ( long ) 1e9 + 7 ; long [ ] [ ] dp = new long [ 100005 ] [ 2 ] ; dp [ 1 ] [ 0 ] = 2 ; for ( int i = 2 ; i <= 100000 ; i ++ ) { dp [ i ] [ 0 ] = ( dp [ i - 1 ] [ 0 ] + dp [ i - 1 ] [ 1 ] ) % mod ; dp [ i ] [ 1 ] = dp [ i - 1 ] [ 0 ] ; } long tot = ( dp [ n ] [ 0 ] + dp [ n ] [ 1 ] + dp [ m ] [ 0 ] + dp [ m ] [ 1 ] + mod - 2 ) % mod ; System . out . println ( tot ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))) name: (identifier) arguments: (argument_list (string_literal))) 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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (cast_expression type: (integral_type) value: (decimal_floating_point_literal)) right: (decimal_integer_literal)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal)) dimensions: (dimensions_expr (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (decimal_integer_literal)) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (decimal_integer_literal)))) right: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))) right: (identifier)) right: (decimal_integer_literal))) right: (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))