(*
ocamlfind ocamlopt -package batteries -linkpkg main.ml -o a.out
*)
open Batteries

let unfair = Int.pow 10 18
let a, b, c, k = Scanf.sscanf (read_line ()) "%d %d %d %d" ( fun a b c k -> a, b, c, k)

let rec f a b c k = 
        let ans = 
                (
                        if k = 0 then
                                a - b
                        else
                        if k = 1 then
                                (b + c) - (a + c)
                        else
                        if k = 2 then
                                (2 * a + (b + c)) - (2 * b + (a + c))
                        else
                                let ki = 3 + 2 * (k - 3) in
                                        (2 * (ki - 2) * a + ki * (b + c)) - (2 * (ki - 2) * b + ki * (a + c))
                ) in
                if abs ans > unfair then
                        "Unsafe"
                else
                        string_of_int ans


let () =
        f a b c k
        |> Printf.printf "%s\n"
