public static void main ( String args [ ] ) {
  FastScanner input = new FastScanner ( ) ;
  int p = input . nextInt ( ) ;
  int x = input . nextInt ( ) ;
  int y = input . nextInt ( ) ;
  for ( int s = y ;
  s <= 1000000 ;
  s ++ ) {
    if ( ( s % 50 ) != ( x % 50 ) ) {
      continue ;
    }
    int i = ( s / 50 ) % 475 ;
    for ( int j = 0 ;
    j < 25 ;
    j ++ ) {
      i = ( i * 96 + 42 ) % 475 ;
      if ( i + 26 == p ) {
        System . out . println ( ( Math . max ( 0 , s - x ) + 50 ) / 100 ) ;
        return ;
      }
    }
  }
}

public static void main ( String args [ ] ) { FastScanner input = new FastScanner ( ) ; int p = input . nextInt ( ) ; int x = input . nextInt ( ) ; int y = input . nextInt ( ) ; for ( int s = y ; s <= 1000000 ; s ++ ) { if ( ( s % 50 ) != ( x % 50 ) ) { continue ; } int i = ( s / 50 ) % 475 ; for ( int j = 0 ; j < 25 ; j ++ ) { i = ( i * 96 + 42 ) % 475 ; if ( i + 26 == p ) { System . out . println ( ( Math . max ( 0 , s - x ) + 50 ) / 100 ) ; return ; } } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) 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: (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)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))) consequence: (block (continue_statement))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (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: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal))) right: (decimal_integer_literal))))) (return_statement)))))))))