def
add
(
x
,
y
)
:
while
y
>
0
:
x
,
y
=
x^y
,
(
x&y
)
<<
1
return
x
def
mult
(
x
,
y
)
:
total
=
0
while
y
>
0
:
if
y&
1
==
1
:
total
=
add
(
total
,
x
)
x
=
x
<<
1
y
=
y
>>
1
return
total