#include <stdio.h>
float caculate ( float n , int count ) { float result = 0 ; int fuhao ; for ( int i = 1 ; i <= count ; i ++ ) { int flag = i ; if ( flag % 2 == 0 ) fuhao = -1 ; else fuhao = 1 ; result += fuhao * n / i ; } return result ; } int main () { float n ; int count ; scanf ( "%f%d" , &n,&count ) ; printf ("%f" , caculate (n ,count)) ; return 0 ; }