#!/usr/bin/env python # -*- coding:utf-8 -*- import math a, b = map(int, input().split()) if a == b: c = math.sqrt(a*a + b*b) print(c) else: c = math.sqrt(abs(a*a - b*b)) print(c)