#include<math.h>
#include<stdio.h>

int main(void){
    int a,b;
    scanf("%d%d", &a, &b);
    printf("%d", sqrt(a) * sqrt(a) + b);
    return 0;
}